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 748B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. #
  3. BASE_FOLDERS="data Downloads media_images Videos C64"
  4. VIP_FOLDERS="prj prj/Arduino Schreibtisch"
  5. echo The following folders will be deleted:
  6. for folder in $BASE_FOLDERS; do
  7. echo -e "* $HOME/\033[1m$folder\033[0m"
  8. done
  9. for folder in $VIP_FOLDERS; do
  10. echo -e "* $HOME/\033[1m$folder\033[0m"
  11. done
  12. echo
  13. read -r -p "Are you sure? [y/N] " response
  14. case "$response" in
  15. [yY][eE][sS]|[yY])
  16. for folder in $BASE_FOLDERS; do
  17. rm -rf $HOME/`basename $folder`; ln -s /usr/data/$USER/$folder $HOME
  18. done
  19. for folder in $VIP_FOLDERS; do
  20. rm -rf $HOME/`basename $folder`; ln -s /usr/data/$USER/data/$folder $HOME
  21. done
  22. ;;
  23. *)
  24. echo No folder initialisation!
  25. ;;
  26. esac