#!/bin/bash
if [ "$1" = "-p" ]
then
echo -e "Doing a Pacman-Update with \e[0;31mStandard\e[00m settings."
pacman -Suyy
elif [ "$1" = "-y" ]
if [ "$2" = "-s" ]
then
echo -e "Doing a Yaourt-Update \e[0;31mwithout asking\e[00m!"
yaourt -Suyy --aur --noconfirm
else
echo -e "Doing a Yaourt-Update \e[0;31mwith asking\e[00m!"
yaourt -Suyy --aur
fi
#else
# echo -e "Please specify the correct options! packages [-p] [-y] [-s]"
fi
Returns...
/scripts/packages: Zeile 18: Syntaxfehler beim unerwarteten Wort (Syntaxerror at unexpected word) `fi'
/scripts/packages: Zeile 18: `fi
Why is fi and unexpected word? It closes my first if. Does not work with the else either, then it says that else is unexpected.
I hope bash does not expect a bush of flowers and a goldring from me.