Created
October 14, 2019 11:02
-
-
Save bepcyc/4a7c94a2949fb89324132ed97582760d to your computer and use it in GitHub Desktop.
check PPAs availability for a new Ubuntu release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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