mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
readd root check
This commit is contained in:
parent
d3ff5de077
commit
ab98e45891
1 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,12 @@ if [[ -z "${NAME}" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
### check for root
|
||||
if ! [[ ${UID} -eq 0 ]]; then
|
||||
echo "ERROR: Please run as root user!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -z "${_DIR}" ]]; then
|
||||
[[ ! -d $_DIR ]] && mkdir $_DIR
|
||||
cd $_DIR
|
||||
|
|
Loading…
Reference in a new issue