bin/init_homepath

30 lines
713 B
Plaintext
Raw Normal View History

2020-01-26 17:28:29 +01:00
#!/bin/sh
#
2021-08-26 10:19:44 +02:00
BASE_FOLDERS="data Downloads media_images Videos C64"
VIP_FOLDERS="prj Schreibtisch"
2020-01-26 17:28:29 +01:00
echo The following folders will be deleted:
2021-08-26 10:19:44 +02:00
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"
2020-01-26 17:28:29 +01:00
done
echo
read -r -p "Are you sure? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
2021-08-26 10:19:44 +02:00
for folder in $BASE_FOLDERS; do
rm -f $HOME/$folder; ln -s /usr/data/$USER/$folder $HOME
done
for folder in $VIP_FOLDERS; do
rm -rf $HOME/$folder; ln -s /usr/data/$USER/data/$folder $HOME
done
;;
*)
echo No folder initialisation!
;;
esac