Posted By

yoblob on 01/06/11


Tagged

Bash


Versions (?)

check empty variable


 / Published in: Bash
 

Check for empty variable. proceed accordingly

  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  

You need to login to post a comment.