|
@@ -1,13 +1,26 @@
|
1
|
1
|
#!/bin/sh
|
2
|
2
|
#
|
3
|
3
|
|
4
|
|
-rm -f $HOME/data; ln -s /user_data/data/$USER $HOME/data
|
5
|
|
-
|
6
|
|
-for folder in Bilder Dokumente eclipse Musik prj Schreibtisch; do
|
7
|
|
- rm -rf $HOME/$folder; ln -s /user_data/data/$USER/$folder $HOME
|
8
|
|
-done
|
|
4
|
+REPLACE_FOLDERS="Audio Bilder data Dokumente Downloads eclipse Musik prj Schreibtisch Videos"
|
9
|
5
|
|
10
|
6
|
|
11
|
|
-for folder in Audio Downloads Videos; do
|
12
|
|
- rm -rf $HOME/$folder; ln -s /user_data/static_data/$USER/$folder $HOME
|
|
7
|
+echo The following folders will be deleted:
|
|
8
|
+for folder in $REPLACE_FOLDERS; do
|
|
9
|
+ echo "* $HOME/\033[1m$folder\033[0m"
|
13
|
10
|
done
|
|
11
|
+echo
|
|
12
|
+read -r -p "Are you sure? [y/N] " response
|
|
13
|
+case "$response" in
|
|
14
|
+ [yY][eE][sS]|[yY])
|
|
15
|
+ for folder in $REPLACE_FOLDERS; do
|
|
16
|
+ if [ "$folder" = "data" ]; then
|
|
17
|
+ rm -f $HOME/data; ln -s /usr/data/$USER $HOME/data
|
|
18
|
+ else
|
|
19
|
+ rm -rf $HOME/$folder; ln -s /usr/data/$USER/$folder $HOME
|
|
20
|
+ fi
|
|
21
|
+ done
|
|
22
|
+ ;;
|
|
23
|
+ *)
|
|
24
|
+ echo No folder initialisation!
|
|
25
|
+ ;;
|
|
26
|
+esac
|