Ask to re-run a failed step

This commit is contained in:
maride 2017-09-03 16:52:51 +02:00
parent 9b7374f768
commit c5bae37f33

View File

@ -55,18 +55,28 @@ done
for flavour in flavours/*.flavour for flavour in flavours/*.flavour
do do
echo -n "=> Do you want to run flavour '$flavour'? (y/N) " # in any case, run it once
read answer rerun=1
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then while [ $rerun ]; do
echo "=> Running flavour '$flavour'..." echo -n "=> Do you want to run flavour '$flavour'? (y/N) "
pushd $flavour read answer
source ./install.sh
if [ "$amf_return" -ne 0 ]; then if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo "=> Flavour failed. :(" echo "=> Running flavour '$flavour'..."
fi pushd $flavour
popd source ./install.sh
fi rerun=0;
if [ "$amf_return" -ne 0 ]; then
echo "=> Flavour failed. :( Rerun? (Y/n) "
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
rerun=1;
fi
fi
popd
fi
done
done done
echo -n "=> Finished \o/ reboot now? (Y/n) " echo -n "=> Finished \o/ reboot now? (Y/n) "