Skip to content

Commit

Permalink
Merge pull request #516 from cybercongress/install_script_upd
Browse files Browse the repository at this point in the history
upd to cli-install script
  • Loading branch information
cyborgshead authored Apr 3, 2020
2 parents a08c260 + dca9ade commit c2aa035
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts/install_cyberdcli_v0.1.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ PLATFORM=$(uname)
case "$PLATFORM" in
"Darwin")
# macOS
curl https://mars.cybernode.ai/go-cyber/go_cyber_v0.1.6_darwin-amd64.tar.gz --output go_cyber_v0.1.6_darwin-amd64.tar.gz
tar -xzf go_cyber_v0.1.6_darwin-amd64.tar.gz -C ./
curl -OL https://github.com/cybercongress/go-cyber/releases/download/v0.1.6/cyberdcli_v0.1.6_darwin-amd64.tar.gz
tar -xzf cyberdcli_v0.1.6_darwin-amd64.tar.gz
for binpath in $binpaths; do
if cp build_v0.1.6_darwin_amd64/cyberdcli "$binpath"; then
for libpath in $libpaths; do
Expand All @@ -32,21 +32,22 @@ case "$PLATFORM" in
done
echo "Moved $bin to $binpath"
echo "Enjoy your cyber experience!"
rm go_cyber_v0.1.6_darwin-amd64.tar.gz
rm cyberdcli_v0.1.6_darwin-amd64.tar.gz
rm -rf build_v0.1.6_darwin_amd64
exit 0
else
if [ -d "$binpath" ] && [ ! -w "$binpath" ]; then
is_write_perm_missing=1
rm go_cyber_v0.1.6_darwin-amd64.tar.gz
rm cyberdcli_v0.1.6_darwin-amd64.tar.gz
rm -rf build_v0.1.6_darwin_amd64
fi
fi
done
;;
"Linux")
# Linux distro,
curl https://mars.cybernode.ai/go-cyber/go_cyber_v0.1.6_linux-amd64.tar.gz --output go_cyber_v0.1.6_linux-amd64.tar.gz
tar -xzf go_cyber_v0.1.6_linux-amd64.tar.gz -C ./
curl -OL https://github.com/cybercongress/go-cyber/releases/download/v0.1.6/cyberdcli_v0.1.6_linux-amd64.tar.gz
tar -xzf cyberdcli_v0.1.6_linux-amd64.tar.gz -C ./
for binpath in $binpaths; do
if cp build_v0.1.6_linux_amd64/cyberdcli "$binpath"; then
for libpath in $libpaths; do
Expand All @@ -62,12 +63,14 @@ case "$PLATFORM" in
done
echo "Moved $bin to $binpath"
echo "Enjoy your cyber experience!"
rm go_cyber_v0.1.6_linux-amd64.tar.gz
rm cyberdcli_v0.1.6_linux-amd64.tar.gz
rm -rf build_v0.1.6_linux_amd64
exit 0
else
if [ -d "$binpath" ] && [ ! -w "$binpath" ]; then
is_write_perm_missing=1
rm go_cyber_v0.1.6_darwin-amd64.tar.gz
rm cyberdcli_v0.1.6_darwin-amd64.tar.gz
rm -rf build_v0.1.6_linux_amd64
fi
fi
done
Expand Down

0 comments on commit c2aa035

Please sign in to comment.