summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-11-05 13:49:50 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-05 13:49:50 -0500
commit34ac2931234b898d587bffe76ba061082b6c673c (patch)
tree2b613cca360a54b6285836aa0413a50158ddc147 /lib
parent33f227ec628f30b70ee5b1412fd47564325b4b4c (diff)
parent98166e3454139918304b3e0a314e41628dd0c61c (diff)
downloaddevtools-34ac2931234b898d587bffe76ba061082b6c673c.tar.xz
Merge branch 'archlinux'libretools-20141128
Conflicts: arch-nspawn.in archbuild.in makechrootpkg.in
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common.sh b/lib/common.sh
index 6305528..b1e7d6e 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -85,8 +85,9 @@ trap_abort() {
}
trap_exit() {
+ local r=$?
trap - EXIT INT QUIT TERM HUP
- cleanup
+ cleanup $r
}
die() {
@@ -266,7 +267,6 @@ check_root() {
if type -P sudo >/dev/null; then
exec sudo -- "$@"
else
- exec su root -c "$(printf '%q' "$@")"
+ exec su root -c "$(printf ' %q' "$@")"
fi
- die 'This script must be run as root.'
}