parent
044b8da55a
commit
759617c9c0
288 changed files with 13040 additions and 1 deletions
20
bots/images/scripts/ubuntu-stable.bootstrap
Executable file
20
bots/images/scripts/ubuntu-stable.bootstrap
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/sh -ex
|
||||
|
||||
# determine latest stable release (see https://launchpad.net/+apidoc)
|
||||
# in most cases the current series is devel, except for right after a stable release
|
||||
rel=$(curl --silent https://api.launchpad.net/devel/ubuntu/current_series_link | sed 's/^"//; s/"$//')
|
||||
if ! curl --silent "$rel" | grep -q '"supported": true'; then
|
||||
# not supported, go back
|
||||
rel=$(curl --silent "$rel/previous_series_link" | sed 's/^"//; s/"$//')
|
||||
|
||||
if ! curl --silent "$rel" | grep -q '"supported": true'; then
|
||||
echo "ERROR: neither of the last two releases are supported!?" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# release name is the last part of the URL
|
||||
rel=${rel##*/}
|
||||
|
||||
exec $(dirname $0)/lib/debian.bootstrap "$1" "$2" ubuntu-18.04 "deb http://archive.ubuntu.com/ubuntu $rel main universe
|
||||
deb http://archive.ubuntu.com/ubuntu ${rel}-updates main universe
|
||||
deb http://security.ubuntu.com/ubuntu ${rel}-security main universe"
|
||||
Loading…
Add table
Add a link
Reference in a new issue