mirror of
https://github.com/frej/fast-export.git
synced 2026-05-07 04:37:40 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2536f87544 | ||
|
|
17c8a22066 | ||
|
|
7aa82e8234 | ||
|
|
02bb982dd9 |
@@ -7,7 +7,18 @@ READLINK="readlink"
|
|||||||
if command -v greadlink > /dev/null; then
|
if command -v greadlink > /dev/null; then
|
||||||
READLINK="greadlink" # Prefer greadlink over readlink
|
READLINK="greadlink" # Prefer greadlink over readlink
|
||||||
fi
|
fi
|
||||||
ROOT="$(dirname "$($READLINK -f "$(which "$0")")")"
|
|
||||||
|
if ! $READLINK -f "$(which "$0")" > /dev/null 2>&1 ; then
|
||||||
|
ROOT="$(dirname "$(which "$0")")"
|
||||||
|
if [ ! -f "$ROOT/hg-fast-export.py" ] ; then
|
||||||
|
echo "hg-fast-exports requires a readlink implementation which knows" \
|
||||||
|
" how to canonicalize paths in order to be called via a symlink."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ROOT="$(dirname "$($READLINK -f "$(which "$0")")")"
|
||||||
|
fi
|
||||||
|
|
||||||
REPO=""
|
REPO=""
|
||||||
PFX="hg2git"
|
PFX="hg2git"
|
||||||
SFX_MAPPING="mapping"
|
SFX_MAPPING="mapping"
|
||||||
@@ -59,7 +70,7 @@ if test "z$IS_BARE" != ztrue; then
|
|||||||
# This is not a bare repo, cd to the toplevel
|
# This is not a bare repo, cd to the toplevel
|
||||||
TOPLEVEL=$(git rev-parse --show-toplevel) \
|
TOPLEVEL=$(git rev-parse --show-toplevel) \
|
||||||
|| (echo "Could not find git repo toplevel" ; exit 1)
|
|| (echo "Could not find git repo toplevel" ; exit 1)
|
||||||
cd $TOPLEVEL || exit 1
|
cd "$TOPLEVEL" || exit 1
|
||||||
fi
|
fi
|
||||||
GIT_DIR=$(git rev-parse --git-dir) || (echo "Could not find git repo" ; exit 1)
|
GIT_DIR=$(git rev-parse --git-dir) || (echo "Could not find git repo" ; exit 1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user