Skip to content
Snippets Groups Projects
Commit aeaabb68 authored by efer's avatar efer
Browse files

check shell

parent 2e9c56f1
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# Main Variables # Main Variables
SCRIPTNAME="comp-backup" SCRIPTNAME="comp-backup"
VERSION=4 VERSION=5
LOGNAME="backup_logfile" LOGNAME="backup_logfile"
TARGETNODE="userbackup1.compute.dtu.dk" TARGETNODE="userbackup1.compute.dtu.dk"
HOST=$(hostname -s) HOST=$(hostname -s)
...@@ -137,8 +137,16 @@ elif [ ! -d $BIN_DIR ]; then ...@@ -137,8 +137,16 @@ elif [ ! -d $BIN_DIR ]; then
fi fi
$(echo $PATH | grep -o $BIN_DIR &>/dev/null) $(echo $PATH | grep -o $BIN_DIR &>/dev/null)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\nexport PATH=$PATH:$BIN_DIR" >> $H/.bash_profile if [ $SHELL == '/bin/bash' ]; then
source $H/.bash_profile echo -e "\nexport PATH=$PATH:$BIN_DIR" >> $H/.bash_profile
source $H/.bash_profile
elif [ $SHELL == '/bin/zsh' ]; then
echo -e "\nexport PATH=$PATH:$BIN_DIR" >> $H/.zprofile
source $H/.zprofile
else
echo -e "\nexport PATH=$PATH:$BIN_DIR" >> $H/.profile
source $H/.profile
fi
fi fi
if [ ! -d $CONF_DIR ]; then if [ ! -d $CONF_DIR ]; then
mkdir -p $CONF_DIR mkdir -p $CONF_DIR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment