#!/bin/bash # #Be careful when downloading form https://artifacts.bitmessage.at. It's just a dump of binaries, it doesn't separate the official with development binaries. # #To find out which is the latest official one, go to github and click on the icon indicating the latest official build result. # #Peter Surda #Bitmessage developer # set -ex IMAGE_LIST="https://artifacts.bitmessage.at/appimage" LAST_IMAGE="$(wget -q $IMAGE_LIST -O- | grep -oP '[[:digit:]]{5}' | tail -n1)" IMAGE_FILENAME="$(wget -q $IMAGE_LIST/$LAST_IMAGE -O- | grep -oE '"PyBitmessage-.*-x86_64.AppImage"')" IMAGE_FILENAME=${IMAGE_FILENAME:1:-1} URL="$IMAGE_LIST/$LAST_IMAGE/$IMAGE_FILENAME" DEST_FILE="$HOME/$IMAGE_FILENAME" HARD_LINK="$HOME/PyBitmessage.AppImage" if ! [ -f $DEST_FILE ]; then wget -c $URL -O $DEST_FILE chmod u+x $DEST_FILE cp -v -fl $DEST_FILE $HARD_LINK fi #remove old appimage files ls -1 -tc $HOME/PyBitmessage-.*-x86_64.AppImage 2>/dev/null \ | tail -n +3 \ | xargs -I{} rm -f $HOME/{}