Skip to content

Commit

Permalink
chore: make install script (not tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Jan 7, 2022
1 parent 9a24348 commit 749132f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions assets/install.sh
@@ -0,0 +1,25 @@
#!/bin/sh

set -e

latest_version() {
curl -L -s -H 'Accept: application/json' https://github.com/macrat/concron/releases/latest | sed -e 's/.*"tag_name":"v\([-+.a-zA-Z0-9]*\)".*/\1/'
}

version=${CONCRON_VERSION:-$(latest_version)}

download_url="https://github.com/macrat/concron/releases/download/${version}/concron_${version}_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"


echo "Start install Concron version ${version}..."
echo ""
echo "OS: $(uname -s)"
echo "Arch: $(uname -m)"
echo "URL: ${download_url}"
echo ""

curl -sSLf ${download_url} -o /usr/local/bin/concron
chmod 755 /usr/local/bin/concron

echo ""
echo "Installation success!"

0 comments on commit 749132f

Please sign in to comment.