daily pastebin goal
85%
SHARE
TWEET

Bash: Syntax error?

a guest Aug 31st, 2012 23 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function install_vanilla {
  2. echo "Welcome to the vanilla server wizard!"
  3. echo "We are going to install your server."
  4. echo "Thank you for using this."
  5. echo ""
  6. echo "First we going to prepare the server folder."
  7. if [ -d $SERVER ]
  8.  
  9.         echo "Server folder found. Not creating it."
  10.  
  11.         if [ -f $SERVER/server.jar ]
  12.  
  13.                 echo "Server files found,"
  14.                 read -p "Do you want to remove them? [y/N] " SERVER_INSTALL_CONFIRM
  15.  
  16.                 case $SERVER_INSTALL_CONFIRM in
  17.                         y) rm -D $SERVER;;
  18.                         Y) rm -D $SERVER;;
  19.                         n) echo "Server not installed!" && exit;;
  20.                         N) echo "Server not installed!" && exit;;
  21.                         *) echo "Server not installed!" && exit
  22.                 esac
  23.  
  24.  
  25.         else
  26.                 echo "No files in folder found!"
  27.                 echo "Ignoring it."
  28.         fi
  29.  
  30. else
  31.  
  32.         echo "Server folder not found. Creating it."
  33.         mkdir $SERVER
  34.  
  35. fi
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top