error checks, one var less

This commit is contained in:
parazyd 2016-04-21 12:47:30 +02:00
parent dc86a4c73b
commit b85f2e5719
No known key found for this signature in database
GPG Key ID: BB5E2E35B92E373E
2 changed files with 7 additions and 5 deletions

View File

@ -22,11 +22,11 @@
init() { init() {
fn init $* fn init $*
distro="$1" os="$1"
armdev="$2" armdev="$2"
req=(distro armdev) req=(os armdev)
ckreq || { ckreq || {
error "No distro or device specified" error "Missing arguments. Please retry."
return 1 return 1
} }
@ -43,7 +43,10 @@ init() {
) )
arm_build_device=${arm_map[$armdev]} arm_build_device=${arm_map[$armdev]}
common="$R/arm/profiles/common-${os}"
[[ -f $common ]] || { error "No valid distro specified"; return 1 }
[[-f $arm_build_device ]] || { error "No valid device specified"; return 1 }
common="$R/arm/profiles/common-${distro}"
source ${arm_build_device} source ${arm_build_device}
} }

View File

@ -23,7 +23,6 @@
# Common functions for builds # Common functions for builds
# -- settings -- # -- settings --
os=devuan
release=jessie release=jessie
section=main section=main
version=alpha4 version=alpha4