aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ebuild-helpers/fperms')
-rwxr-xr-xbin/ebuild-helpers/fperms6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms
index 9620cc06a..9e5da5d16 100755
--- a/bin/ebuild-helpers/fperms
+++ b/bin/ebuild-helpers/fperms
@@ -12,10 +12,12 @@ got_mode=
for arg; do
# - can either be an option or a mode string
[[ ${arg} == -* && ${arg} != -[ugorwxXst] ]] && continue
+
if [[ ! ${got_mode} ]]; then
got_mode=1
continue
fi
+
if [[ ${arg} != /* ]]; then
eqawarn "Relative path passed to '${0##*/}': ${arg}"
eqawarn "This is unsupported. Please use 'chmod' when you need to work on files"
@@ -28,5 +30,5 @@ done
slash="/"
chmod "${@/#${slash}/${ED%/}${slash}}"
ret=$?
-[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
-exit $ret
+[[ ${ret} -ne 0 ]] && __helpers_die "${0##*/} failed"
+exit ${ret}