Skip to content

Commit

Permalink
implement upgrade in get_ampm.sh (closes #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wazzaps committed Mar 28, 2022
1 parent c62d493 commit 75e4f2c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ampm/get_ampm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ if [ "$(id -u)" -ne 0 ]; then
fi

echo 'Downloading ampm...'
mkdir -p /opt/ampm
cd /opt/ampm
mkdir -p /opt/ampm.tmp
cd /opt/ampm.tmp
curl --progress-bar -fsSL https://github.com/Wazzaps/ampm/releases/latest/download/ampm.tar.gz | tar xz

echo ''
echo 'Adding ampm launcher to /usr/local/bin/...'
install /opt/ampm/ampm.sh /usr/local/bin/ampm
echo "Configuring remote repo to be '$REMOTE_REPO'..."
echo "$REMOTE_REPO" > /opt/ampm.tmp/repo_uri

echo ''
echo "Configuring remote repo to be '$REMOTE_REPO'..."
echo "$REMOTE_REPO" > /opt/ampm/repo_uri
echo 'Adding ampm launcher to /usr/local/bin/...'
install /opt/ampm.tmp/ampm.sh /usr/local/bin/ampm

# Commit changes
rm -rf /opt/ampm
mv /opt/ampm.tmp /etc/ampm

echo ''
echo 'Done! Try running `ampm --help` to see what you can do with ampm.'
Expand Down

0 comments on commit 75e4f2c

Please sign in to comment.