check empty variable


/ Published in: Bash
Save to your folder(s)

Check for empty variable. proceed accordingly


Copy this code and paste it in your HTML
  1. if [[ -n $RELEASE]]
  2. then
  3. SVN_DIR=/release/$RELEASE
  4. if [ -d $SVN_DIR ]
  5. then
  6. echo "-------------------------------"
  7. echo "You have chosen to build with $SVN_DIR"
  8. echo "-------------------------------"
  9. /home/bin/BuildRelease.sh $SVN_DIR
  10. else
  11. echo "the $SVN_DIR does not exist
  12. fi
  13. fi

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.