A bin folder, holding helpfull scripts and commands
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

init_homepath 669B

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