iankelling.org
/
git
/
automated-distro-installer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11a2db1
)
bugfix calling as nonroot user
author
Ian Kelling
<iank@fsf.org>
Sun, 2 Sep 2018 23:56:53 +0000
(19:56 -0400)
committer
Ian Kelling
<iank@fsf.org>
Sun, 2 Sep 2018 23:56:53 +0000
(19:56 -0400)
myfai-chboot-local
patch
|
blob
|
history
diff --git
a/myfai-chboot-local
b/myfai-chboot-local
index 5140f68bb73f349bdf741974b1fbef7e7ba076c5..d8d484658bc1d8895319f32de764a84a5927bec2 100755
(executable)
--- a/
myfai-chboot-local
+++ b/
myfai-chboot-local
@@
-1,5
+1,8
@@
#!/bin/bash
# note, this script gets piped to bash, so cant cd to current dir
+
+[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@"
+
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
@@
-29,8
+32,6
@@
while [[ $1 == -* ]]; do
esac
done
-[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@"
-
e() {
echo "$*"
if ! "$@"; then