You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
830 B

  1. #!/bin/sh
  2. mkdir -p ~/.my/log
  3. mkdir -p ~/.local/bin
  4. _my_install_script(){
  5. local dir="$HOME/.local/bin"
  6. mkdir -p "$dir"
  7. for f in "$@"
  8. do
  9. bn=$(basename "$f")
  10. type $bn >/dev/null 2>&1 || {
  11. if type wget >/dev/null 2>&1
  12. then
  13. wget "$f" -P "$dir/" &&
  14. chmod u+x "${dir}/${bn}"
  15. elif type curl >/dev/null 2>&1
  16. then
  17. curl --url "$f" --output "${dir}/${bn}" &&
  18. chmod u+x "${dir}/${bn}"
  19. fi
  20. }
  21. done
  22. }
  23. _my_install_script http://www.frexx.de/xterm-256-notes/data/colortable16.sh http://www.frexx.de/xterm-256-notes/data/256colors2.pl
  24. _my_install_symlink_script(){
  25. mkdir -p "$HOME/.local/bin/"
  26. for f in "$@"
  27. do
  28. ln -s "$PWD/$f" "$HOME/.local/bin/"
  29. done
  30. }