Skip to content

Instantly share code, notes, and snippets.

@bepcyc
Created October 14, 2019 11:02
Show Gist options
  • Save bepcyc/4a7c94a2949fb89324132ed97582760d to your computer and use it in GitHub Desktop.
Save bepcyc/4a7c94a2949fb89324132ed97582760d to your computer and use it in GitHub Desktop.
check PPAs availability for a new Ubuntu release
# DIST is a current release codename (e.g. bionic)
# NEXT_DIST is a next release codename (e.g. disco)
# error codes 301 and 200 mean there is a page, 404 - meansthere is not
DIST=$(. /etc/os-release; echo $VERSION_CODENAME); NEXT_DIST=disco; for url in $(grep -h -v "^#" /etc/apt/sources.list.d/*.list|grep "^deb" | sort -u | grep $DIST | awk -v n="$NEXT_DIST" '{print $2"/dists/"n}'); do echo $url $(curl -s -o /dev/null -w "%{http_code}" "$url"); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment