A bin folder, holding helpfull scripts and commands
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

init_homepath 808B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. #
  3. BASE_FOLDERS="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/local/$folder $HOME
  18. done
  19. rm -rf $HOME/data; ln -s /usr/data/$USER/data data
  20. for folder in $VIP_FOLDERS; do
  21. rm -rf $HOME/`basename $folder`; ln -s /usr/data/$USER/data/$folder $HOME
  22. done
  23. ;;
  24. *)
  25. echo No folder initialisation!
  26. ;;
  27. esac