2020-05-18 16:52:26 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-03-26 17:50:12 +01:00
|
|
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
source $current_dir/utils.sh # Get utils functions.
|
|
|
|
|
2023-05-16 12:14:15 +02:00
|
|
|
for debian_version in "bullseye"
|
2020-03-26 17:50:12 +01:00
|
|
|
do
|
2023-05-17 16:48:45 +02:00
|
|
|
rebuild_base_containers "$PREFIX_IMAGE_NAME-$debian_version" "$debian_version" "stable" "amd64"
|
2020-05-19 16:45:04 +02:00
|
|
|
|
2020-08-01 21:17:14 +02:00
|
|
|
for ynh_version in "testing" "unstable"
|
|
|
|
do
|
|
|
|
for snapshot in "before-install" "after-install"
|
2020-05-19 17:48:31 +02:00
|
|
|
do
|
2023-05-17 16:48:45 +02:00
|
|
|
restore_snapshot "$PREFIX_IMAGE_NAME-$debian_version" "stable" "$snapshot"
|
2020-08-01 21:17:14 +02:00
|
|
|
|
|
|
|
if [[ "$ynh_version" == "testing" ]]
|
|
|
|
then
|
|
|
|
repo_version="testing"
|
|
|
|
elif [[ "$DISTRIB" == "unstable" ]]
|
|
|
|
then
|
|
|
|
repo_version="testing unstable"
|
|
|
|
fi
|
|
|
|
|
2023-05-17 16:48:45 +02:00
|
|
|
lxc exec "$PREFIX_IMAGE_NAME-$debian_version" -- /bin/bash -c "for FILE in \`ls /etc/apt/sources.list /etc/apt/sources.list.d/*\`;
|
2020-08-01 21:17:14 +02:00
|
|
|
do
|
|
|
|
sed -i 's@^deb http://forge.yunohost.org.*@& $repo_version@' \$FILE
|
|
|
|
done"
|
2020-05-19 16:45:04 +02:00
|
|
|
|
2023-05-17 16:48:45 +02:00
|
|
|
create_snapshot "$PREFIX_IMAGE_NAME-$debian_version" "$ynh_version" "$snapshot"
|
2023-05-17 16:34:44 +02:00
|
|
|
|
2023-05-17 16:48:45 +02:00
|
|
|
update_container "$PREFIX_IMAGE_NAME-$debian_version" "$debian_version" "$ynh_version" "$snapshot"
|
2020-05-19 16:45:04 +02:00
|
|
|
done
|
2020-08-01 21:17:14 +02:00
|
|
|
done
|
2021-06-17 15:43:50 +02:00
|
|
|
done
|
2023-05-16 12:14:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
for debian_version in "bookworm"
|
|
|
|
do
|
2023-05-17 16:48:45 +02:00
|
|
|
rebuild_base_containers "$PREFIX_IMAGE_NAME-$debian_version" "$debian_version" "unstable" "amd64"
|
2023-05-16 12:14:15 +02:00
|
|
|
done
|
|
|
|
|