my_config/add_bash

18 lines
480 B
Plaintext
Raw Normal View History

2023-04-30 13:55:56 +02:00
#!/bin/zsh
#
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [[ (-e ~/.bashrc.d) ]]; then
echo "A bash configuration already exists (~/.bashrc.d)"
echo "Remove this configuration and start the script again"
else
echo "Creating base link"
ln -vs $SCRIPTPATH/.bashrc.d ~/.bashrc.d
fi
GS=`grep .bashrc.d ~/.bashrc`
if [ ${#GS} -eq 0 ]; then
echo "Adding execution of scripts in ~.bashrc.d"
cat ~/.bashrc.d/BASHRC_ADDON >> ~/.bashrc
fi