if [ ! -f "${_PATH_APTMARK_TAG}" ]; then
continue
fi
- echo "For tag '"${_TAG}"', installing"
+ echo -n "For tag '${_TAG}', make sure this is installed: "
cat "${_PATH_APTMARK_TAG}" | while read _LINE; do
if [ ! $(echo "${_LINE}" | cut -c1) = "#" ]; then
- apt-get -qq -y -o Dpkg::Options::="--force-confnew" install "${_LINE}"
+ echo -n "${_LINE} "
+ apt-get -y -o Dpkg::Options::="--force-confnew" install "${_LINE}" > /dev/null
fi
done
echo '\n'
# before purging, ensure tagged packages installed
ensure_packages_of_tags $@
echo "Autoremove and purge …"
- apt-get -qqq -y --purge autoremove
+ apt-get -y --purge autoremove > /dev/null
echo "And now: dist-upgrade …"
- apt-get -qqq -y dist-upgrade
+ apt-get -y dist-upgrade > /dev/null
}
--- /dev/null
+path_tmp_timestamped () {
+ printf "/tmp/${1}_$(date +'%s')"
+}
. lib/constants_finished
put_finished_marker() {
+ echo "Marking as finished: $1"
mkdir -p "${PATH_ROOT_FINISHEDS}"
touch "${PATH_ROOT_FINISHEDS}/$1"
}
. lib/ensure_etc_of_tags
. lib/expect_n_args
. lib/init_packages
+. lib/path_tmp_timestamped
. lib/put_finished_marker
. lib/setup_users
PATH_HOSTS="${PATH_ETC}/hosts"
PATH_BORG_HOME=/home/borg
PATH_CADDYFILE="${PATH_ETC}/caddy/Caddyfile"
+PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable'
echo '\nPreparing caddy install.'
-PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable'
-apt-get -qq -y install curl
-curl -1Lf "${PATH_CADDY_REPO}/gpg.key" | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
+apt-get -y install curl > /dev/null
+PATH_CURL_ERROR="$(path_tmp_timestamped curl_error)"
+set +e
+curl -1Lf "${PATH_CADDY_REPO}/gpg.key" 2> "${PATH_CURL_ERROR}" | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
+RESULT="$?"
+set -e
+if [ "${RESULT}" != '0' ]; then
+ cat "${PATH_CURL_ERROR}"
+ exit 1
+fi
curl -1Lf "${PATH_CADDY_REPO}/debian.deb.txt" > /etc/apt/sources.list.d/caddy-stable.list
init_packages "${MIN_TAGS}"
+++ /dev/null
-path_tmp_timestamped () {
- printf "/tmp/${1}_$(date +'%s')"
-}
--- /dev/null
+../../../bookworm/scripts/lib/path_tmp_timestamped
\ No newline at end of file