A little light scraping seems to work pretty well:dgw wrote:From what I can tell,downloads the experimental release if available. I haven't been able to find a way to download the latest stable release. Does one exist?Code: Select all
https://www.factorio.com/get-download/latest/headless/linux64
Code: Select all
#!/bin/sh
mylatest=
check=https://www.factorio.com/download-headless/stable
latest=$(curl -sL $check | awk '/get-download/{print get""$2;exit}' FS=\" get=${check%/down*})
[[ $latest != $mylatest ]] && {
curl -sL "$latest" > newrelease.tar.xz
sed -i '0,/mylatest/s|mylatest=.*|mylatest='$latest'|' "$0"
haveyourwaywith newrelease.tar.xz
}