Skip to content

Instantly share code, notes, and snippets.

@yenda
Last active October 11, 2018 19:35
Show Gist options
  • Save yenda/bd0b011c05ffd94e606f8ac0667906da to your computer and use it in GitHub Desktop.
Save yenda/bd0b011c05ffd94e606f8ac0667906da to your computer and use it in GitHub Desktop.
Script to download and start lastest status-desktop on Linux : WILL CLOSE THE APP IF UPGRADE AVAILABLE!!!!
#!/bin/bash
# put in the directory where you want to download status, then call `chmod +x status` then `./status`
curl https://raw.githubusercontent.com/status-im/status-im.github.io/develop/env.sh > $PWD/env.sh
chmod +x ./env.sh
source env.sh
if [ -a current ]
then
CURRENT=$(cat current)
echo "Current version is $CURRENT"
else
echo "No current known version"
fi
if [ "$CURRENT" != "$NIX_URL" ]
then
echo "Downloading newer version"
echo $NIX_URL > current
kill $(pgrep AppRun)
kill $(pgrep ubuntu-server)
sleep 5
curl $NIX_URL > StatusIm.AppImage
chmod +x StatusIm.AppImage
fi
if [ -z "$(pgrep AppRun)" ]
then
echo "Starting app"
./StatusIm.AppImage
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment