mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Minor, correct arc handling of relative symlinking (from @makinde).
This commit is contained in:
parent
0d76ac6968
commit
2a66d6bde9
1 changed files with 8 additions and 2 deletions
10
bin/arc
10
bin/arc
|
@ -7,9 +7,15 @@
|
|||
# symlinks, etc.
|
||||
SOURCE="${BASH_SOURCE[0]}";
|
||||
while [ -h "$SOURCE" ]; do
|
||||
SOURCE="$(readlink "$SOURCE")";
|
||||
LINK="$(readlink "$SOURCE")";
|
||||
if [ "${LINK:0:1}" == "/" ]; then
|
||||
# absolute symlink
|
||||
SOURCE="$LINK"
|
||||
else
|
||||
# relative symlink
|
||||
SOURCE="$(cd -P "$(dirname "$SOURCE")" && pwd)/$LINK"
|
||||
fi
|
||||
done;
|
||||
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
||||
|
||||
exec $DIR/../scripts/arcanist.php "$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue