Add the ability to disable install

This commit is contained in:
Alexandre CATTEAU 2022-03-17 15:08:12 +01:00
parent 0edea05e46
commit 4d0de08caa
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.disabled

View File

@ -3,6 +3,11 @@
run_directory=$(dirname "$0") run_directory=$(dirname "$0")
user=$(whoami) user=$(whoami)
if [ -f $run_directory/.disabled ]; then
echo "Installation is disabled. Exiting..."
exit 0
fi
if [[ $user != 'root' ]]; then if [[ $user != 'root' ]]; then
echo "Copying rcs to home directory..." echo "Copying rcs to home directory..."
cp $run_directory/bashrc /home/$user/.bashrc cp $run_directory/bashrc /home/$user/.bashrc