Advertisement
muhviehstarr

bashrc.sh

Jan 31st, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #test if user has variable already set
  4.  
  5. grep TESTSSL_INSTALL_DIR $HOME/.bashrc >> /dev/null
  6.  
  7. if [ $? -eq 0 ]
  8.     then
  9. echo "already set for current user"
  10. exit 0
  11.     else
  12. echo "export TESTSSL_INSTALL_DIR=/root/testssl.sh" >> $HOME/.bashrc
  13.     fi
  14. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement