aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-28 21:43:10 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-28 21:44:28 +0000
commit8f1f671123c63a470f9ae3b571a65df4112f0036 (patch)
treec3f04c5329da0286d035b3bde4c4d3318b38a7db
parentREADME: fix badge link (diff)
downloadconfig-links-8f1f671123c63a470f9ae3b571a65df4112f0036.tar.gz
config-links-8f1f671123c63a470f9ae3b571a65df4112f0036.zip
allow bin/*.sh be symlinked
-rwxr-xr-xbin/unlink.sh5
-rwxr-xr-xbin/update.sh5
2 files changed, 6 insertions, 4 deletions
diff --git a/bin/unlink.sh b/bin/unlink.sh
index e1962d4..982e535 100755
--- a/bin/unlink.sh
+++ b/bin/unlink.sh
@@ -13,8 +13,9 @@ set -o pipefail
script_name="$( basename -- "${BASH_SOURCE[0]}" )"
readonly script_name
-script_dir="$( dirname -- "${BASH_SOURCE[0]}" )"
-script_dir="$( cd -- "$script_dir" && pwd )"
+script_path="$( realpath --canonicalize-existing -- "${BASH_SOURCE[0]}" )"
+readonly script_path
+script_dir="$( dirname -- "$script_path" )"
readonly script_dir
src_dir="$( cd -- "$script_dir/../src" && pwd )"
readonly src_dir
diff --git a/bin/update.sh b/bin/update.sh
index 6c9ab78..1b98e9f 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -25,8 +25,9 @@ set -o pipefail
script_name="$( basename -- "${BASH_SOURCE[0]}" )"
readonly script_name
-script_dir="$( dirname -- "${BASH_SOURCE[0]}" )"
-script_dir="$( cd -- "$script_dir" && pwd )"
+script_path="$( realpath --canonicalize-existing -- "${BASH_SOURCE[0]}" )"
+readonly script_path
+script_dir="$( dirname -- "$script_path" )"
readonly script_dir
src_dir="$( cd -- "$script_dir/../src" && pwd )"
readonly src_dir