From 4c4b8b624c3835be0c46cef4f12e30cf76d0cc8e Mon Sep 17 00:00:00 2001 From: maride Date: Sat, 2 Sep 2017 15:07:59 +0200 Subject: [PATCH] Add amf_return return code everywhere --- checks/packeys.check | 6 ++++-- flavours/i3.flavour/install.sh | 2 ++ flavours/sudo.flavour/install.sh | 2 ++ flavours/unsplash.flavour/install.sh | 2 ++ flavours/virtualbox-guest.flavour/install.sh | 2 ++ flavours/wifi-menu.flavour/install.sh | 2 ++ flavours/xorg.flavour/install.sh | 2 ++ steps/30-formatting.step | 2 ++ steps/40-install.step | 2 ++ steps/50-configure.step | 2 ++ 10 files changed, 22 insertions(+), 2 deletions(-) diff --git a/checks/packeys.check b/checks/packeys.check index a65549f..5739c48 100755 --- a/checks/packeys.check +++ b/checks/packeys.check @@ -1,5 +1,7 @@ #!/bin/bash +amf_return=0 + dirmngr & -pacman-key --populate -pacman-key --refresh-keys +pacman-key --populate || amf_return=1 +pacman-key --refresh-keys || amf_return=1 diff --git a/flavours/i3.flavour/install.sh b/flavours/i3.flavour/install.sh index e2b3f1c..3041fd3 100755 --- a/flavours/i3.flavour/install.sh +++ b/flavours/i3.flavour/install.sh @@ -14,3 +14,5 @@ echo "~> Creating .xinitrc" echo "xcompmgr -c &" > $path/.xinitrc echo "feh --bg-fill ~/background.jpg" >> $path/.xinitrc echo "exec i3" >> $path/.xinitrc + +amf_return=0 diff --git a/flavours/sudo.flavour/install.sh b/flavours/sudo.flavour/install.sh index 94bca3c..26a4da4 100755 --- a/flavours/sudo.flavour/install.sh +++ b/flavours/sudo.flavour/install.sh @@ -6,3 +6,5 @@ pacstrap /mnt sudo echo "~> Create group sudo and patch sudoers file" arch-chroot /mnt groupadd sudo arch-chroot /mnt sed -i "s/^# %sudo/%sudo/g" /etc/sudoers + +amf_return=0 diff --git a/flavours/unsplash.flavour/install.sh b/flavours/unsplash.flavour/install.sh index 75af8ff..1ca54bd 100755 --- a/flavours/unsplash.flavour/install.sh +++ b/flavours/unsplash.flavour/install.sh @@ -5,3 +5,5 @@ echo "~> Grabbing a random image from unsplash.com..." mkdir -p /mnt/etc/wallpapers/ wget https://unsplash.com/photos/$(curl https://unsplash.com/search/photos/forest | grep -oE "photo=([a-zA-Z0-9_\\-]*)" | shuf -n 1 | sed -e "s/photo=//g")/download -O /mnt/etc/wallpapers/forest.jpg + +amf_return=0 diff --git a/flavours/virtualbox-guest.flavour/install.sh b/flavours/virtualbox-guest.flavour/install.sh index 80e75cb..bde11ba 100755 --- a/flavours/virtualbox-guest.flavour/install.sh +++ b/flavours/virtualbox-guest.flavour/install.sh @@ -2,3 +2,5 @@ echo "~> Installing packages to be a virtualbox guest" pacstrap /mnt virtualbox-guest-utils virtualbox-guest-modules-arch + +amf_return=0 diff --git a/flavours/wifi-menu.flavour/install.sh b/flavours/wifi-menu.flavour/install.sh index 34e9c50..1b11d8d 100755 --- a/flavours/wifi-menu.flavour/install.sh +++ b/flavours/wifi-menu.flavour/install.sh @@ -1,3 +1,5 @@ #!/bin/sh pacstrap /mnt dialog wpa_supplicant + +amf_return=0 diff --git a/flavours/xorg.flavour/install.sh b/flavours/xorg.flavour/install.sh index 3962c80..80abd9c 100755 --- a/flavours/xorg.flavour/install.sh +++ b/flavours/xorg.flavour/install.sh @@ -1,3 +1,5 @@ #!/bin/sh pacstrap /mnt xorg xorg-xinit xterm + +amf_return=0 diff --git a/steps/30-formatting.step b/steps/30-formatting.step index 764ccb2..f42ff21 100755 --- a/steps/30-formatting.step +++ b/steps/30-formatting.step @@ -26,3 +26,5 @@ echo "~> Mount partitions" mount $rootformat /mnt mkdir -p /mnt/boot mount ${blockdevice}1 /mnt/boot + +amf_return=0 diff --git a/steps/40-install.step b/steps/40-install.step index 3e73fc6..f63bdda 100755 --- a/steps/40-install.step +++ b/steps/40-install.step @@ -2,3 +2,5 @@ echo "~> Installing 'base' group and 'grub', 'efibootmgr'" pacstrap /mnt base grub efibootmgr + +amf_return=0 diff --git a/steps/50-configure.step b/steps/50-configure.step index d752d5c..7224c68 100755 --- a/steps/50-configure.step +++ b/steps/50-configure.step @@ -33,3 +33,5 @@ echo "HOOKS=\"base udev autodetect modconf block keyboard keymap encrypt filesys echo "~> ... and recompile the kernel" arch-chroot /mnt mkinitcpio -p linux + +amf_return=0