Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
setup-apt-repo: Move supported release check earlier.
Anders Kaseorg7077a289ae56
diff --git a/scripts/lib/setup-apt-repo b/scripts/lib/setup-apt-repoindex 6821055f74f..d3bfb0d28a2 100755--- a/scripts/lib/setup-apt-repo+++ b/scripts/lib/setup-apt-repo@@ -54,6 +54,16 @@ firelease="$(. /etc/os-release && printf '%s' "$VERSION_CODENAME")"+if [ ! -f "$LIST_PATH/$release.list" ]; then+ cat <<EOF+Unsupported release $release for sources.list file $LIST. To add a+new release, make a $LIST_PATH/$release.list file based on existing+.list files in that directory.++EOF+ exit 1+fi+DEPENDENCIES_HASH=$(sha1sum "$LIST_PATH/"*.asc "$0")DEPENDENCIES_HASH_FILE="/var/lib/zulip/setup-repositories-state-$LIST"# Ensure that DEPENDENCIES_HASH_FILE exists before hashing it.@@ -80,18 +90,8 @@ if ! apt-get -dy install "${pre_setup_deps[@]}"; thenfiapt-get -y install "${pre_setup_deps[@]}"-if [ -f "$LIST_PATH/$release.list" ]; then- apt-key add "$LIST_PATH/"*.asc- cp "$LIST_PATH/$release.list" "$SOURCES_FILE"-else- cat <<EOF-Unsupported release $release for sources.list file $LIST. To add a-new release, make a $LIST_PATH/$release.list file based on existing-.list files in that directory.--EOF- exit 1-fi+apt-key add "$LIST_PATH/"*.asc+cp "$LIST_PATH/$release.list" "$SOURCES_FILE"if [ -e "$LIST_PATH/custom.sh" ]; thenexport LIST_PATH