new start script
- ID
46b0c87- date
2022-05-04 22:15:24+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
c295185- message
new start script- changed files
1 file, 9 additions, 4 deletions
Changed files
webapp/start.sh (577) → webapp/start.sh (695)
diff --git a/webapp/start.sh b/webapp/start.sh
index b3b3f0b..31d245c 100755
--- a/webapp/start.sh
+++ b/webapp/start.sh
@@ -1,21 +1,26 @@
#!/usr/bin/env bash
set -o errexit
-set -o nounset
pip3 install -r requirements.txt
-DOWNLOAD_URL=$(curl --silent 'https://api.github.com/repos/alexwlchan/dominant_colours/releases/latest' \
- | jq -r ' .assets | map(.browser_download_url) | map(select(test(".*linux.*")))[0]'
-)
+DOWNLOAD_URL="https://github.com/alexwlchan/dominant_colours/releases/download/v1.1.1/dominant_colours-x86_64-unknown-linux-musl.tar.gz"
+
+# Remove any existing downloads
+rm -f dominant_colours*
# The --location flag means we follow redirects
curl --location "$DOWNLOAD_URL" > dominant_colours.tar.gz
+md5sum dominant_colours.tar.gz
tar -xzf dominant_colours.tar.gz
chmod +x dominant_colours
+md5sum dominant_colours
./dominant_colours --version
+# Make sure we can find dominant_colours in the app
+export PATH=$(pwd):$PATH
+
if [[ "$DEBUG" == "yes" ]]
then
python3 server.py