Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. param=$1
  4. config="gurkan"
  5. name="defaultname"
  6. mail="defaultmail"
  7.  
  8. BLUE='\033[0;34m'
  9. ORANGE='\033[0;33m'
  10. GREEN='\033[0;32m'
  11. NC='\033[0m'
  12.  
  13. echo "\n${ORANGE}---- current ----${NC}"
  14. git config --global --list
  15. echo "${ORANGE}---- current ----${NC}\n"
  16.  
  17. if [ "$param" != "$config" ]; then
  18. if [ "$param" != "" ]; then
  19. config="$param"
  20. name="$1"
  21. mail="$2"
  22. fi
  23. fi
  24.  
  25. echo "${BLUE}---- new settings ----${NC}"
  26. echo "new name : $name"
  27. echo "new mail : $mail"
  28. echo "${BLUE}---- new settings ----${NC}\n"
  29.  
  30. git config --global user.name "$name"
  31. git config --global user.email "$mail"
  32.  
  33. echo "${GREEN}---- new ----${NC}"
  34. git config --global --list
  35. echo "${GREEN}---- new ----${NC}\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement