terror checks, one var less - arm-sdk - os build toolkit for various embedded devices (HTM) git clone https://git.parazyd.org/arm-sdk (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules (DIR) README (DIR) LICENSE --- (DIR) commit b85f2e57197db46bbc5fa6ff223c88905d90bcdf (DIR) parent dc86a4c73b82e27091d2363efed1b1884f8cc992 (HTM) Author: parazyd <parazyd@dyne.org> Date: Thu, 21 Apr 2016 12:47:30 +0200 error checks, one var less Diffstat: M arm/init-arm | 11 +++++++---- M arm/profiles/common-devuan | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) --- (DIR) diff --git a/arm/init-arm b/arm/init-arm t@@ -22,11 +22,11 @@ init() { fn init $* - distro="$1" + os="$1" armdev="$2" - req=(distro armdev) + req=(os armdev) ckreq || { - error "No distro or device specified" + error "Missing arguments. Please retry." return 1 } t@@ -43,7 +43,10 @@ init() { ) 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} } (DIR) diff --git a/arm/profiles/common-devuan b/arm/profiles/common-devuan t@@ -23,7 +23,6 @@ # Common functions for builds # -- settings -- -os=devuan release=jessie section=main version=alpha4