Add the ability to disable install

This commit is contained in:
Alexandre CATTEAU 2022-03-17 15:05:53 +01:00
parent 3251615181
commit 7bb0023b2a
2 changed files with 6 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
variables.conf
.disabled

View File

@ -3,6 +3,11 @@
run_directory=$(dirname "$0")
user=$(whoami)
if [ -f $run_directory/.disabled ]; then
echo "Installation is disabled. Exiting..."
exit 0
fi
if [ ! -d /home/$user/.bashrc.d ]; then
echo "~/.bashrc.d does not exist. Creating it..."
mkdir /home/$user/.bashrc.d