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 ##
|
## main script ##
|
||||||
#################
|
#################
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
error "You should run this script as root"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
error "Please specify a name for the archive"
|
error "Please specify a name for the archive"
|
||||||
fi
|
fi
|
||||||
|
@ -99,6 +99,10 @@ check_iso_vars() {
|
|||||||
#################
|
#################
|
||||||
## main script ##
|
## main script ##
|
||||||
#################
|
#################
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
error "You should run this script as root"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
error "Please specify a release archive and a config directory"
|
error "Please specify a release archive and a config directory"
|
||||||
fi
|
fi
|
||||||
@ -146,6 +150,7 @@ set_indent
|
|||||||
info "Removing $e"
|
info "Removing $e"
|
||||||
rm -rf "$TMPDIR/$e"
|
rm -rf "$TMPDIR/$e"
|
||||||
done
|
done
|
||||||
|
rm -rf "$TMPDIR/.git"
|
||||||
unset_indent
|
unset_indent
|
||||||
|
|
||||||
info "Extracting release archive"
|
info "Extracting release archive"
|
||||||
|
Loading…
Reference in New Issue
Block a user