2022-03-13 13:00:13 +01:00
|
|
|
#!/usr/bin/env bash
|
2022-03-12 15:52:47 +01:00
|
|
|
|
2022-09-22 18:47:58 +02:00
|
|
|
run_directory=$(dirname $(readlink -f "$0"))
|
2022-03-14 19:58:21 +01:00
|
|
|
user=$(whoami)
|
2022-03-12 15:52:47 +01:00
|
|
|
|
2022-03-17 14:54:40 +01:00
|
|
|
if [ -f $run_directory/.disabled ]; then
|
|
|
|
echo "Installation is disabled. Exiting..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-03-21 22:05:13 +01:00
|
|
|
if [ ! -d /home/$user/.bashrc.d ]; then
|
|
|
|
echo "~/.bashrc.d does not exist. Creating it..."
|
|
|
|
mkdir /home/$user/.bashrc.d
|
|
|
|
fi
|
|
|
|
|
2022-03-14 19:58:21 +01:00
|
|
|
echo "Copying bashrc-mine to extensions directory..."
|
2022-03-14 19:09:40 +01:00
|
|
|
cp $run_directory/bashrc-mine /home/$user/.bashrc.d/
|
2022-03-12 15:52:47 +01:00
|
|
|
|
|
|
|
echo "Finished install. Exiting..."
|
|
|
|
exit 0
|