Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [[ -z $1 || -z $2 ]]; then
- echo "You need domains! You need twooooooooo!";
- return; #dont know wy I need return - just want program to start over but I could just make it quit
- fi;
- # the expected behavior should be: if $3 = -d or --dry-run & if 1 and 2 aren't null
- if [[ ( $3 == "-d" || "--dry-run" ) && -n $1 && -n $2 ]]; then
- echo "Doing dry run s/r for $1 -> $2";
- sleep 2;
- wpd "$1" "$2" "$d";
- else
- # could do elif?
- if [[ -z $3 ]] && [[ -n $1 && -n $2 ]]; then
- echo "Doing ${red}LIVE${NC} s/r for $1 -> $2";
- sleep 2;
- wpd "$1" "$2";
- elif [[ -z $1 || $1 == "-d" || "--dry-run" ]]; then
- printf "Usage: wpsr domain1 domain2 [ -d | --dry-run ]\nwpsr domain.com domain.net --dry-run\n";
- fi;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement