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.
 
 
 
 
 
 

32 lines
819 B

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