Skip to content

Commit c6d6b8d

Browse files
committed
Enhance: Support symlink of bin/shove which didn't work
1 parent 605eff1 commit c6d6b8d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bin/shove

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ set -eu
44

55
version="0.7.3"
66

7-
bin_dir=$(cd $(dirname $0) && pwd)
7+
bin_path=$0
8+
if [[ -L $0 ]]; then
9+
bin_path=$(readlink $0)
10+
fi
11+
12+
bin_dir=$(cd $(dirname ${bin_path}) && pwd)
813
. ${bin_dir}/../lib/shove.bashrc
914

10-
if [ $SHOVE_DEBUG ]; then
11-
set -x
12-
fi
15+
[[ ${SHOVE_DEBUG:-} ]] && set -x
1316

1417
mkdir -p $SHOVE_WORKDIR
1518

0 commit comments

Comments
 (0)