arch-chroot: fix braino, check for args before shifting
This commit is contained in:
parent
daa2fac5b2
commit
bd413f05ce
@ -62,10 +62,10 @@ done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
(( EUID == 0 )) || die 'This script must be run with root privileges'
|
||||
(( $# )) || die 'No chroot directory specified'
|
||||
chrootdir=$1
|
||||
shift
|
||||
|
||||
(( $# )) || die 'No chroot directory specified'
|
||||
[[ -d $chrootdir ]] || die "Can't create chroot on non-directory %s" "$chrootdir"
|
||||
|
||||
chroot_setup "$chrootdir" || die "failed to setup chroot %s" "$chrootdir"
|
||||
|
Loading…
Reference in New Issue
Block a user