You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.5 KiB
44 lines
1.5 KiB
3 years ago
|
#!/bin/sh
|
||
|
|
||
|
# Run this after a new release to update pin for build container distro packages
|
||
|
|
||
|
set -e
|
||
|
|
||
|
DEBIAN_SNAPSHOT_BASE="https://snapshot.debian.org/archive/debian/"
|
||
|
DEBIAN_APPIMAGE_DISTRO="buster" # should match build-linux/appimage Dockerfile base
|
||
|
DEBIAN_WINE_DISTRO="bullseye" # should match build-wine Dockerfile base
|
||
|
|
||
|
contrib=$(dirname "$0")
|
||
|
|
||
|
|
||
|
if [ ! -x /bin/wget ]; then
|
||
|
echo "no wget"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
DEBIAN_SNAPSHOT_LATEST=$(wget -O- ${DEBIAN_SNAPSHOT_BASE}$(date +"?year=%Y&month=%m") 2>/dev/null|grep "^<a href=\"20"|tail -1|sed -e 's#[^"]*"\(.\{17,17\}\).*#\1#')
|
||
|
|
||
|
if [ "${DEBIAN_SNAPSHOT_LATEST}x" = "x" ]; then
|
||
|
echo "could not find timestamp for debian packages"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
DEBIAN_SNAPSHOT=${DEBIAN_SNAPSHOT_BASE}${DEBIAN_SNAPSHOT_LATEST}
|
||
|
|
||
|
echo "Checking if URL valid.."
|
||
|
wget -O /dev/null ${DEBIAN_SNAPSHOT} 2>/dev/null
|
||
|
|
||
|
echo "Valid!"
|
||
|
|
||
|
# build-linux
|
||
|
echo "deb ${DEBIAN_SNAPSHOT} ${DEBIAN_APPIMAGE_DISTRO} main non-free contrib" >$contrib/build-linux/appimage/apt.sources.list
|
||
|
echo "deb-src ${DEBIAN_SNAPSHOT} ${DEBIAN_APPIMAGE_DISTRO} main non-free contrib" >>$contrib/build-linux/appimage/apt.sources.list
|
||
|
|
||
|
# build-wine
|
||
|
echo "deb ${DEBIAN_SNAPSHOT} ${DEBIAN_WINE_DISTRO} main non-free contrib" >$contrib/build-wine/apt.sources.list
|
||
|
echo "deb-src ${DEBIAN_SNAPSHOT} ${DEBIAN_WINE_DISTRO} main non-free contrib" >>$contrib/build-wine/apt.sources.list
|
||
|
# we need win-iconv-mingw-w64-dev which is only in sid/unstable
|
||
|
echo "deb ${DEBIAN_SNAPSHOT} unstable main non-free contrib" >>$contrib/build-wine/apt.sources.list
|
||
|
|
||
|
echo "updated APT sources to ${DEBIAN_SNAPSHOT}"
|