summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--find-libdeps.in2
-rw-r--r--lib/archroot.sh2
-rw-r--r--rebuildpkgs.in6
3 files changed, 5 insertions, 5 deletions
diff --git a/find-libdeps.in b/find-libdeps.in
index 7a3e6f5..35094d5 100644
--- a/find-libdeps.in
+++ b/find-libdeps.in
@@ -13,7 +13,7 @@ if [[ $1 = "--ignore-internal" ]]; then
shift
fi
-script_mode=${0##*/find-lib}
+script_mode=${BASH_SOURCE[0]##*/find-lib}
case $script_mode in
deps|provides) true;;
diff --git a/lib/archroot.sh b/lib/archroot.sh
index 06d4519..8f063cd 100644
--- a/lib/archroot.sh
+++ b/lib/archroot.sh
@@ -8,7 +8,7 @@ CHROOT_VERSION='v4'
##
# usage : check_root $keepenv
##
-orig_argv=("$0" "$@")
+orig_argv=("${BASH_SOURCE[0]}" "$@")
check_root() {
local keepenv=$1
diff --git a/rebuildpkgs.in b/rebuildpkgs.in
index 4f4f98b..704563c 100644
--- a/rebuildpkgs.in
+++ b/rebuildpkgs.in
@@ -3,7 +3,7 @@
#
# This script rebuilds a list of packages in order
# and reports anything that fails
-#
+#
# Due to sudo usage, it is recommended to allow makechrootpkg
# to be run with NOPASSWD in your sudoers file
#
@@ -14,8 +14,8 @@
m4_include(lib/common.sh)
if (( $# < 1 )); then
- printf 'Usage: %s <chrootdir> <packages to rebuild>\n' "$(basename "$0")"
- printf ' example: %s ~/chroot readline bash foo bar baz\n' "$(basename "$0")"
+ printf 'Usage: %s <chrootdir> <packages to rebuild>\n' "$(basename "${BASH_SOURCE[0]}")"
+ printf ' example: %s ~/chroot readline bash foo bar baz\n' "$(basename "${BASH_SOURCE[0]}")"
exit 1
fi