diff options
author | Jonas Smedegaard <dr@jones.dk> | 2018-01-03 00:15:35 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2018-01-03 00:15:35 +0100 |
commit | 026568483c5574baacdf2e0b86555abbdba622f7 (patch) | |
tree | 47856d6c866b73a403bb4821c6f8d11e41001ba7 | |
parent | a97a3c7f0fc220529cdf47938eb0729ffc7bb5ab (diff) |
Really fix expand BASEDIR when creating config.
-rwxr-xr-x | bin/vdirsyncer | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/vdirsyncer b/bin/vdirsyncer index 2069807..00b7b07 100755 --- a/bin/vdirsyncer +++ b/bin/vdirsyncer @@ -2,7 +2,8 @@ set -eu -BASEDIR=$(realpath --no-symlinks $(dirname "$0/..")) +SCRIPT=$(readlink --canonicalize-missing -- "$(which -- "$0")") #" +BASEDIR=$(dirname -- "$(dirname -- "$SCRIPT")") #" SUBDIR=$(realpath --no-symlinks --relative-to="$HOME" --relative-base="$HOME" "$BASEDIR") [ "$HOME/$SUBDIR" != "$BASEDIR" ] || BASEDIR="~/$SUBDIR" |