diff --git a/cidr2ip/macos.sh b/cidr2ip/macos.sh index 27aef7ec..435cc62c 100755 --- a/cidr2ip/macos.sh +++ b/cidr2ip/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/cidr2ip-${VSN}/cidr2ip_${VSN}_${PLAT}.tar.gz tar -xf cidr2ip_${VSN}_${PLAT}.tar.gz rm cidr2ip_${VSN}_${PLAT}.tar.gz -mv cidr2ip_${VSN}_${PLAT} /usr/local/bin/cidr2ip +sudo mv cidr2ip_${VSN}_${PLAT} /usr/local/bin/cidr2ip echo -echo 'You can now run `cidr2ip`'. +echo 'You can now run `cidr2ip`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/cidr2range/macos.sh b/cidr2range/macos.sh index 0c2ce098..01ec74cd 100755 --- a/cidr2range/macos.sh +++ b/cidr2range/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.2.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/cidr2range-${VSN}/cidr2range_${VSN}_${PLAT}.tar.gz tar -xf cidr2range_${VSN}_${PLAT}.tar.gz rm cidr2range_${VSN}_${PLAT}.tar.gz -mv cidr2range_${VSN}_${PLAT} /usr/local/bin/cidr2range +sudo mv cidr2range_${VSN}_${PLAT} /usr/local/bin/cidr2range echo -echo 'You can now run `cidr2range`'. +echo 'You can now run `cidr2range`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/grepdomain/macos.sh b/grepdomain/macos.sh index 50c42e1f..75e02176 100755 --- a/grepdomain/macos.sh +++ b/grepdomain/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/grepdomain-${VSN}/grepdomain_${VSN}_${PLAT}.tar.gz tar -xf grepdomain_${VSN}_${PLAT}.tar.gz rm grepdomain_${VSN}_${PLAT}.tar.gz -mv grepdomain_${VSN}_${PLAT} /usr/local/bin/grepdomain +sudo mv grepdomain_${VSN}_${PLAT} /usr/local/bin/grepdomain echo -echo 'You can now run `grepdomain`'. +echo 'You can now run `grepdomain`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/grepip/macos.sh b/grepip/macos.sh index 314e62c6..a057fe81 100755 --- a/grepip/macos.sh +++ b/grepip/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.2.3 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/grepip-${VSN}/grepip_${VSN}_${PLAT}.tar.gz tar -xf grepip_${VSN}_${PLAT}.tar.gz rm grepip_${VSN}_${PLAT}.tar.gz -mv grepip_${VSN}_${PLAT} /usr/local/bin/grepip +sudo mv grepip_${VSN}_${PLAT} /usr/local/bin/grepip echo -echo 'You can now run `grepip`'. +echo 'You can now run `grepip`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/ipinfo/macos.sh b/ipinfo/macos.sh index 20fa956d..2e3d9d84 100755 --- a/ipinfo/macos.sh +++ b/ipinfo/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=3.3.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-${VSN}/ipinfo_${VSN}_${PLAT}.tar.gz tar -xf ipinfo_${VSN}_${PLAT}.tar.gz rm ipinfo_${VSN}_${PLAT}.tar.gz -mv ipinfo_${VSN}_${PLAT} /usr/local/bin/ipinfo +sudo mv ipinfo_${VSN}_${PLAT} /usr/local/bin/ipinfo echo -echo 'You can now run `ipinfo`'. +echo 'You can now run `ipinfo`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/matchip/macos.sh b/matchip/macos.sh index 20015699..1970e475 100755 --- a/matchip/macos.sh +++ b/matchip/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/matchip-${VSN}/matchip_${VSN}_${PLAT}.tar.gz tar -xf matchip_${VSN}_${PLAT}.tar.gz rm matchip_${VSN}_${PLAT}.tar.gz -mv matchip_${VSN}_${PLAT} /usr/local/bin/matchip +sudo mv matchip_${VSN}_${PLAT} /usr/local/bin/matchip echo -echo 'You can now run `matchip`'. +echo 'You can now run `matchip`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/prips/macos.sh b/prips/macos.sh index d31347e1..5fc1c842 100755 --- a/prips/macos.sh +++ b/prips/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/prips-${VSN}/prips_${VSN}_${PLAT}.tar.gz tar -xf prips_${VSN}_${PLAT}.tar.gz rm prips_${VSN}_${PLAT}.tar.gz -mv prips_${VSN}_${PLAT} /usr/local/bin/prips +sudo mv prips_${VSN}_${PLAT} /usr/local/bin/prips echo -echo 'You can now run `prips`'. +echo 'You can now run `prips`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/randip/macos.sh b/randip/macos.sh index 701c8aa6..34246b04 100755 --- a/randip/macos.sh +++ b/randip/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.1.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/randip-${VSN}/randip_${VSN}_${PLAT}.tar.gz tar -xf randip_${VSN}_${PLAT}.tar.gz rm randip_${VSN}_${PLAT}.tar.gz -mv randip_${VSN}_${PLAT} /usr/local/bin/randip +sudo mv randip_${VSN}_${PLAT} /usr/local/bin/randip echo -echo 'You can now run `randip`'. +echo 'You can now run `randip`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/range2cidr/macos.sh b/range2cidr/macos.sh index f832f85c..4ea7e3d1 100755 --- a/range2cidr/macos.sh +++ b/range2cidr/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.3.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/range2cidr-${VSN}/range2cidr_${VSN}_${PLAT}.tar.gz tar -xf range2cidr_${VSN}_${PLAT}.tar.gz rm range2cidr_${VSN}_${PLAT}.tar.gz -mv range2cidr_${VSN}_${PLAT} /usr/local/bin/range2cidr +sudo mv range2cidr_${VSN}_${PLAT} /usr/local/bin/range2cidr echo -echo 'You can now run `range2cidr`'. +echo 'You can now run `range2cidr`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/range2ip/macos.sh b/range2ip/macos.sh index 986ce5d6..c39cf3cd 100755 --- a/range2ip/macos.sh +++ b/range2ip/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/range2ip-${VSN}/range2ip_${VSN}_${PLAT}.tar.gz tar -xf range2ip_${VSN}_${PLAT}.tar.gz rm range2ip_${VSN}_${PLAT}.tar.gz -mv range2ip_${VSN}_${PLAT} /usr/local/bin/range2ip +sudo mv range2ip_${VSN}_${PLAT} /usr/local/bin/range2ip echo -echo 'You can now run `range2ip`'. +echo 'You can now run `range2ip`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi diff --git a/splitcidr/macos.sh b/splitcidr/macos.sh index 2320fcd4..4d456bc0 100755 --- a/splitcidr/macos.sh +++ b/splitcidr/macos.sh @@ -1,16 +1,18 @@ #!/bin/sh +set -e + VSN=1.0.0 PLAT=darwin_amd64 curl -LO https://github.com/ipinfo/cli/releases/download/splitcidr-${VSN}/splitcidr_${VSN}_${PLAT}.tar.gz tar -xf splitcidr_${VSN}_${PLAT}.tar.gz rm splitcidr_${VSN}_${PLAT}.tar.gz -mv splitcidr_${VSN}_${PLAT} /usr/local/bin/splitcidr +sudo mv splitcidr_${VSN}_${PLAT} /usr/local/bin/splitcidr echo -echo 'You can now run `splitcidr`'. +echo 'You can now run `splitcidr`.' if [ -f "$0" ]; then - rm $0 + rm "$0" fi