Code:
#!/usr/local/bin/bash
RSA_keys ()
{
echo "making folder rsakeys in /usr/home/"
if [ ! -d $HOME/rsakeys ]; then
cd $HOME
mkdir rsakeys
else
# rest code
fi
}
# Check openSSL
if [ ! -x "/usr/local/bin/openssl" ]; then
#
echo -e "\033[1;31m OpenSSL not found!\033[0m"
echo -e "\033[1;36m do you want install OpenSSL?\n\033[0m
1 - yes\n
2 - no"
read odp
case $odp in
1*)
cd /usr/ports/security/openssl
make install clean
RSA_keys()
;; #here ive got error with ";;"
2*)
echo -e "...!"
;;
esac
else
echo "Script starting"
RSA_keys()
fi
When i tiring execute this script, ive recive message "rsagen.sh: line 25: syntax error near unexpected token ';;'"
rsagen.sh: line 25: ' ;;'
Maybe something in function is wrong and by this ive got eror in case?