2022-03-14 19:45:28 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-09-22 18:53:08 +02:00
|
|
|
run_directory=$(dirname $(readlink -f "$0"))
|
2022-03-14 19:48:30 +01:00
|
|
|
user=$(whoami)
|
2022-03-14 19:45:28 +01:00
|
|
|
|
2022-03-17 15:05:53 +01:00
|
|
|
if [ -f $run_directory/.disabled ]; then
|
|
|
|
echo "Installation is disabled. Exiting..."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-03-14 19:52:16 +01:00
|
|
|
if [ ! -d /home/$user/.bashrc.d ]; then
|
2022-03-14 19:51:01 +01:00
|
|
|
echo "~/.bashrc.d does not exist. Creating it..."
|
|
|
|
mkdir /home/$user/.bashrc.d
|
|
|
|
fi
|
|
|
|
|
2022-03-14 19:45:28 +01:00
|
|
|
echo "Copying bashrc-ffarchiving to extensions directory..."
|
|
|
|
cp $run_directory/templates/bashrc-ffarchiving /home/$user/.bashrc.d/
|
2022-08-28 12:54:00 +02:00
|
|
|
sed -i -e "s:PH_DIRECTORY:$run_directory:g" /home/$user/.bashrc.d/bashrc-ffarchiving
|
2022-03-14 19:45:28 +01:00
|
|
|
|
|
|
|
echo "Finished install. Exiting..."
|
|
|
|
exit 0
|