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 @@
# Main Variables
SCRIPTNAME="comp-backup"
VERSION=4
VERSION=5
LOGNAME="backup_logfile"
TARGETNODE="userbackup1.compute.dtu.dk"
HOST=$(hostname -s)
......@@ -137,8 +137,16 @@ elif [ ! -d $BIN_DIR ]; then
fi
$(echo $PATH | grep -o $BIN_DIR &>/dev/null)
if [ $? -ne 0 ]; then
echo -e "\nexport PATH=$PATH:$BIN_DIR" >> $H/.bash_profile
source $H/.bash_profile
if [ $SHELL == '/bin/bash' ]; then
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
if [ ! -d $CONF_DIR ]; then
mkdir -p $CONF_DIR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment