mirror of
https://github.com/frej/fast-export.git
synced 2025-11-16 15:35:51 +01:00
Make hg-fst-export.sh callable via a symbolic link
Calling hg-fast-export.sh via a symlink used to fail because the script would look for hg-fast-export.py in the symlink‘s directory. This patch adds symlink resolution using greadlink with a fallback to readlink in order to support MacOS. That way you can safely add a symlink to hg-fast-export.sh somewhere in you PATH. Fixes https://github.com/frej/fast-export/issues/93
This commit is contained in:
committed by
Frej Drejhammar
parent
4bb50bb3fb
commit
ac887f310f
@@ -3,7 +3,11 @@
|
||||
# Copyright (c) 2007, 2008 Rocco Rutte <pdmef@gmx.net> and others.
|
||||
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
|
||||
|
||||
ROOT="$(dirname "$(which "$0")")"
|
||||
READLINK="readlink"
|
||||
if command -v greadlink > /dev/null; then
|
||||
READLINK="greadlink" # Prefer greadlink over readlink
|
||||
fi
|
||||
ROOT="$(dirname "$($READLINK -f "$(which "$0")")")"
|
||||
REPO=""
|
||||
PFX="hg2git"
|
||||
SFX_MAPPING="mapping"
|
||||
|
||||
Reference in New Issue
Block a user