Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramkhatri authored Sep 9, 2020
1 parent f4576ca commit c5c9706
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions db2pc.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/bin/bash

TOOL=db2-orchestrator
OS="$(uname)"
if [ "x${OS}" = "xDarwin" ] ; then
OSEXT="osx"
else
OSEXT="linux"
fi

# Determine the latest version by version number.
if [ "x${DB2PC_VERSION}" = "x" ] ; then
Expand All @@ -21,17 +15,17 @@ if [ "x${DB2PC_VERSION}" = "x" ] ; then
exit;
fi

printf "\nDownloading %s from %s ..." "$DB2PC_VERSION" "$URL"
URL="https://github.com/vikramkhatri/db2/releases/download/$DB2PC_VERSION/$TOOL"
printf "\nDownloading %s from %s ..." "$DB2PC_VERSION" "$URL"
if [[ $EUID -eq 0 ]]; then
curl -L -s $URL -o /usr/local/bin/$TOOL
chmod +x /usr/local/bin/$TOOL
echo "Installed /usr/local/bin/$TOOL"
echo "Installed $TOOL in /usr/local/bin/$TOOL"
ls -l /usr/local/bin/$TOOL
else
curl -L -s $URL -o ./$TOOL
chmod +x ./$TOOL
echo "Installed $HOME/$TOOL"
echo "Installed in $HOME/$TOOL"
fi


Expand Down

0 comments on commit c5c9706

Please sign in to comment.