Don’t use realpath to find kickstart source path. (#13208)
Don’t use realpath to find kcisktart source path. It doesn’t work on macOS and leads to a bogus error message being printed.
Austin S. Hemmelgarn committed
Jun 27, 2022 at 07:44 UTC
3c0f54232cad9ceb1d6a4c4c811f6d2b56963535
1 file changed
+10
-1
packaging/installer/kickstart.sh
+10
-1
@@ -16,7 +16,16 @@ DISCUSSIONS_URL="https://github.com/netdata/netdata/discussions"
16
DOCS_URL="https://learn.netdata.cloud/docs/"
17
FORUM_URL="https://community.netdata.cloud/"
18
KICKSTART_OPTIONS="${*}"
19
-KICKSTART_SOURCE="$(realpath "$0")"
19
+KICKSTART_SOURCE="$(
20
+ self=${0}
21
+ while [ -L "${self}" ]
22
+ do
23
+ cd "${self%/*}" || exit 1
24
+ self=$(readlink "${self}")
25
+ done
26
+ cd "${self%/*}" || exit 1
27
+ echo "$(pwd -P)/${self##*/}"
28
+)"
29
PACKAGES_SCRIPT="https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh"
30
PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
31
PUBLIC_CLOUD_URL="https://app.netdata.cloud"