Advertisement
Guest User

Untitled

a guest
Mar 17th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. if [[ -z $1 || -z $2 ]]; then
  2. echo "You need domains! You need twooooooooo!";
  3. return; #dont know wy I need return - just want program to start over but I could just make it quit
  4. fi;
  5. # the expected behavior should be: if $3 = -d or --dry-run & if 1 and 2 aren't null
  6. if [[ ( $3 == "-d" || "--dry-run" ) && -n $1 && -n $2 ]]; then
  7. echo "Doing dry run s/r for $1 -> $2";
  8. sleep 2;
  9. wpd "$1" "$2" "$d";
  10.  
  11. else
  12. # could do elif?
  13. if [[ -z $3 ]] && [[ -n $1 && -n $2 ]]; then
  14.  
  15. echo "Doing ${red}LIVE${NC} s/r for $1 -> $2";
  16. sleep 2;
  17. wpd "$1" "$2";
  18.  
  19. elif [[ -z $1 || $1 == "-d" || "--dry-run" ]]; then
  20. printf "Usage: wpsr domain1 domain2 [ -d | --dry-run ]\nwpsr domain.com domain.net --dry-run\n";
  21. fi;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement