diff options
author | Varac <varac@leap.se> | 2017-06-26 14:31:26 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-06-26 14:31:36 +0200 |
commit | 5022d91c9b4dad19dab9f1139bdea97a26617ebc (patch) | |
tree | ddbbd9f6582ec349b7e4571508141c06d197b53e /debian/show-versions-in-repo.sh | |
parent | 89aa15112096356cc95871ec539aa739ca0c6c05 (diff) |
Add show-versions-in-repo.sh
Diffstat (limited to 'debian/show-versions-in-repo.sh')
-rwxr-xr-x | debian/show-versions-in-repo.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/show-versions-in-repo.sh b/debian/show-versions-in-repo.sh new file mode 100755 index 0000000..c33444d --- /dev/null +++ b/debian/show-versions-in-repo.sh @@ -0,0 +1,20 @@ +#!/bin/sh + + +usage() { + echo "$0 <repo> <dist> <component>" + echo + echo "Show which package versions are included in which debian repo" + echo "Example: $0 platform jessie snapshots" + exit 1 +} + +repo="$1" +dist="$2" +component="$3" + +[ -z "$repo" ] && usage +[ -z "$dist" ] && usage +[ -z "$component" ] && usage + +curl -s "http://deb.leap.se/${repo}/dists/${dist}/${component}/binary-amd64/Packages" | grep -A2 '^Package' | egrep -v '^(Architecture|Source)' | tr '\n' ' ' | sed 's/--/\n/g' | sed 's/^ *//' |