install.sh: add creation of extensions directory if does not exist

This commit is contained in:
Alexandre CATTEAU 2022-03-14 19:51:01 +01:00
parent aed2e730bc
commit 72048f8180

View File

@ -3,6 +3,11 @@
run_directory=$(dirname "$0") run_directory=$(dirname "$0")
user=$(whoami) user=$(whoami)
if [ -d /home/$user/.bashrc.d ]; then
echo "~/.bashrc.d does not exist. Creating it..."
mkdir /home/$user/.bashrc.d
fi
echo "Copying bashrc-ffarchiving to extensions directory..." echo "Copying bashrc-ffarchiving to extensions directory..."
cp $run_directory/templates/bashrc-ffarchiving /home/$user/.bashrc.d/ cp $run_directory/templates/bashrc-ffarchiving /home/$user/.bashrc.d/
sed -i -e "s:PH_DIRECTORY:$run_directory:g" /home/$user/.bashrc.d/bashrc-ffarchiving sed -i -e "s:PH_DIRECTORY:$run_directory:g" /home/$user/.bashrc.d/bashrc-ffarchiving