fix: Add root user checks, auto-remove .git from the iso
This commit is contained in:
parent
d572b4b94e
commit
710a0048f0
@ -51,6 +51,10 @@ check_ret() {
|
||||
#################
|
||||
## main script ##
|
||||
#################
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
error "You should run this script as root"
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
error "Please specify a name for the archive"
|
||||
fi
|
||||
|
@ -99,6 +99,10 @@ check_iso_vars() {
|
||||
#################
|
||||
## main script ##
|
||||
#################
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
error "You should run this script as root"
|
||||
fi
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
error "Please specify a release archive and a config directory"
|
||||
fi
|
||||
@ -146,6 +150,7 @@ set_indent
|
||||
info "Removing $e"
|
||||
rm -rf "$TMPDIR/$e"
|
||||
done
|
||||
rm -rf "$TMPDIR/.git"
|
||||
unset_indent
|
||||
|
||||
info "Extracting release archive"
|
||||
|
Loading…
Reference in New Issue
Block a user