Skip to content

Instantly share code, notes, and snippets.

@jellicoe
jellicoe / update.sh
Last active August 16, 2024 23:38 — forked from WietseWind/update.sh
Xahaud RPC Mainnet Node (in Docker) binary update
update=2024.8.14-release+946
container=$(docker ps -a |grep xahau|cut -d " " -f 1)
build=$(docker exec -it $container /opt/xahaud/bin/xahaud -q --version|rev|cut -d "+" -f 1|rev|sed 's/[^0-9]*//g')
docker exec -it $container sh -c "curl https://build.xahau.tech/$update > /opt/xahaud/bin/new"
docker exec -it $container chmod +x /opt/xahaud/bin/new
newbuild=$(docker exec -it $container /opt/xahaud/bin/new -q --version|rev|cut -d "+" -f 1|rev|sed 's/[^0-9]*//g')
if [[ "$newbuild" -lt "$build" ]]; then
echo "Not OK, $build gt $newbuild"