From e0a457879e9158e2e43c751cffb2805ea3e10a4e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 10 Jan 2015 12:16:25 +0100 Subject: [PATCH] diskimg: move variant settings to pre.inc.sh --- platforms/diskimg/post.inc.sh | 8 -------- platforms/diskimg/pre.inc.sh | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 platforms/diskimg/pre.inc.sh diff --git a/platforms/diskimg/post.inc.sh b/platforms/diskimg/post.inc.sh index b0440d5..82816e8 100644 --- a/platforms/diskimg/post.inc.sh +++ b/platforms/diskimg/post.inc.sh @@ -1,11 +1,3 @@ -case $VARIANT in - bananapi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-bpi"; DEVICEARCH=arm ;; - raspberrypi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-rpi"; DEVICEARCH=arm ;; - cubox) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-cubox" ;; - livecd) MODE=usbinstall; ROOTFSINSTALL_ADD="-cubox" ;; - *) MODE=rootfsinstall; ROOTFSINSTALL_ADD= ; DEVICEARCH=$ARCH ;; -esac - if [ "$MODE" = "rootfsinstall" ]; then /usr/sbin/rootfsinstall -y $ROOTFSINSTALL_ADD $LOOPDEV \ $LOCALSTATEDIR/openmamba-rootfs-light-$LANGUAGE.$DEVICEARCH.tar.xz || \ diff --git a/platforms/diskimg/pre.inc.sh b/platforms/diskimg/pre.inc.sh new file mode 100644 index 0000000..c0bbc46 --- /dev/null +++ b/platforms/diskimg/pre.inc.sh @@ -0,0 +1,7 @@ +case $VARIANT in + bananapi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-bpi"; DEVICEARCH=arm; MEDIA_SIZE=1920 ;; + raspberrypi) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-rpi"; DEVICEARCH=arm; MEDIA_SIZE=1920 ;; + cubox) MODE=rootfsinstall; ROOTFSINSTALL_ADD="-cubox" DEVICEARCH=arm; MEDIA_SIZE=1920 ;; + livecd) MODE=usbinstall; ROOTFSINSTALL_ADD= ;; + *) MODE=rootfsinstall; ROOTFSINSTALL_ADD= ; DEVICEARCH=$ARCH ;; +esac