bin/init_homepath
2022-08-28 10:03:35 +02:00

31 lines
808 B
Bash
Executable File

#!/bin/sh
#
BASE_FOLDERS="Downloads media_images Videos C64"
VIP_FOLDERS="prj prj/Arduino Schreibtisch"
echo The following folders will be deleted:
for folder in $BASE_FOLDERS; do
echo -e "* $HOME/\033[1m$folder\033[0m"
done
for folder in $VIP_FOLDERS; do
echo -e "* $HOME/\033[1m$folder\033[0m"
done
echo
read -r -p "Are you sure? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
for folder in $BASE_FOLDERS; do
rm -rf $HOME/`basename $folder`; ln -s /usr/data/$USER/local/$folder $HOME
done
rm -rf $HOME/data; ln -s /usr/data/$USER/data data
for folder in $VIP_FOLDERS; do
rm -rf $HOME/`basename $folder`; ln -s /usr/data/$USER/data/$folder $HOME
done
;;
*)
echo No folder initialisation!
;;
esac