Skip to content

Commit

Permalink
updated cli install convenience scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
abu-usama committed Jan 11, 2024
1 parent 205b5c8 commit 61c540a
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 30 deletions.
26 changes: 23 additions & 3 deletions cidr2ip/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/cidr2ip-${VSN}/cidr2ip_${VSN}.deb
sudo dpkg -i cidr2ip_${VSN}.deb
rm cidr2ip_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac

curl -LO https://github.com/ipinfo/cli/releases/download/cidr2ip-${VSN}/cidr2ip_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i cidr2ip_${VSN}_linux_${ARCH_NAME}.deb
rm cidr2ip_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `cidr2ip`'.
Expand Down
25 changes: 22 additions & 3 deletions cidr2range/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.2.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/cidr2range-${VSN}/cidr2range_${VSN}.deb
sudo dpkg -i cidr2range_${VSN}.deb
rm cidr2range_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/cidr2range-${VSN}/cidr2range_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i cidr2range_${VSN}_linux_${ARCH_NAME}.deb
rm cidr2range_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `cidr2range`'.
Expand Down
25 changes: 22 additions & 3 deletions grepdomain/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/grepdomain-${VSN}/grepdomain_${VSN}.deb
sudo dpkg -i grepdomain_${VSN}.deb
rm grepdomain_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/grepdomain-${VSN}/grepdomain_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i grepdomain_${VSN}_linux_${ARCH_NAME}.deb
rm grepdomain_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `grepdomain`'.
Expand Down
25 changes: 22 additions & 3 deletions grepip/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.2.3
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/grepip-${VSN}/grepip_${VSN}.deb
sudo dpkg -i grepip_${VSN}.deb
rm grepip_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/grepip-${VSN}/grepip_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i grepip_${VSN}_linux_${ARCH_NAME}.deb
rm grepip_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `grepip`'.
Expand Down
25 changes: 22 additions & 3 deletions matchip/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/matchip-${VSN}/matchip${VSN}.deb
sudo dpkg -i matchip_${VSN}.deb
rm matchip_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/matchip-${VSN}/matchip_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i matchip_${VSN}_linux_${ARCH_NAME}.deb
rm matchip_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `matchip`'.
Expand Down
25 changes: 22 additions & 3 deletions prips/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/prips-${VSN}/prips_${VSN}.deb
sudo dpkg -i prips_${VSN}.deb
rm prips_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/prips-${VSN}/prips_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i prips_${VSN}_linux_${ARCH_NAME}.deb
rm prips_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `prips`'.
Expand Down
25 changes: 22 additions & 3 deletions randip/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.1.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/randip-${VSN}/randip_${VSN}.deb
sudo dpkg -i randip_${VSN}.deb
rm randip_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/randip-${VSN}/randip_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i randip_${VSN}_linux_${ARCH_NAME}.deb
rm randip_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `randip`'.
Expand Down
25 changes: 22 additions & 3 deletions range2cidr/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.3.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/range2cidr-${VSN}/range2cidr_${VSN}.deb
sudo dpkg -i range2cidr_${VSN}.deb
rm range2cidr_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/range2cidr-${VSN}/range2cidr_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i range2cidr_${VSN}_linux_${ARCH_NAME}.deb
rm range2cidr_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `range2cidr`'.
Expand Down
25 changes: 22 additions & 3 deletions range2ip/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/range2ip-${VSN}/range2ip_${VSN}.deb
sudo dpkg -i range2ip_${VSN}.deb
rm range2ip_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/range2ip-${VSN}/range2ip_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i range2ip_${VSN}_linux_${ARCH_NAME}.deb
rm range2ip_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `range2ip`'.
Expand Down
25 changes: 22 additions & 3 deletions splitcidr/deb.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#!/bin/sh

VSN=1.0.0
DEFAULT_ARCH=amd64

curl -LO https://github.com/ipinfo/cli/releases/download/splitcidr-${VSN}/splitcidr_${VSN}.deb
sudo dpkg -i splitcidr_${VSN}.deb
rm splitcidr_${VSN}.deb
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH_NAME="amd64"
;;
i386|i686)
ARCH_NAME="386"
;;
aarch64)
ARCH_NAME="arm64"
;;
armv7l)
ARCH_NAME="arm"
;;
*)
ARCH_NAME=$DEFAULT_ARCH
;;
esac
curl -LO https://github.com/ipinfo/cli/releases/download/splitcidr-${VSN}/splitcidr_${VSN}_linux_${ARCH_NAME}.deb
sudo dpkg -i splitcidr_${VSN}_linux_${ARCH_NAME}.deb
rm splitcidr_${VSN}_linux_${ARCH_NAME}.deb

echo
echo 'You can now run `splitcidr`'.
Expand Down

0 comments on commit 61c540a

Please sign in to comment.