Advertisement
tygcrawford

fix-install

May 14th, 2024 (edited)
682
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.59 KB | None | 0 0
  1. #!/usr/bin/env zsh
  2.  
  3. mkdir -pv ~/.scripts/bash
  4. echo 'export PATH=$HOME/.scripts/bash:$PATH' >> ~/.zshrc
  5. export PATH=$HOME/.scripts/bash/:$PATH
  6.  
  7.  
  8. seteditor="https://pastebin.com/raw/nb0Fi3d7"
  9.  
  10. curl -o ~/.scripts/bash/set-editor $seteditor
  11. chmod u+x ~/.scripts/bash/set-editor
  12. echo -n "What is your preferred text editor? (full application name)\n> "
  13. read editor
  14. ~/.scripts/bash/set-editor "$editor"
  15.  
  16.  
  17. micro="https://pastebin.com/raw/kGTHt6WJ"
  18.  
  19. temp=$(mktemp)
  20. [ $? -eq 0 ] || exit 1
  21. [ -f $temp ] || exit 1
  22. trap 'rm -f "$temp"' SIGTERM SIGINT EXIT
  23. curl -o $temp $micro
  24. source $temp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement