Open tylerecouture opened 7 years ago
It should check if it's already there, if not, add it.
Put the line in a variable, then check if it's there with something like: https://stackoverflow.com/questions/4749330/how-to-test-if-string-exists-in-file-with-bash-shell
Add a check to see if it exists first using grep, something like this:
grep
if ! echo $PATH | grep -q /opt/puppetlabs/bin ; then export PATH=$PATH:/opt/puppetlabs/bin fi
It should check if it's already there, if not, add it.
Put the line in a variable, then check if it's there with something like: https://stackoverflow.com/questions/4749330/how-to-test-if-string-exists-in-file-with-bash-shell