tbetter populate_aliases.sh in contrib - amprolla - devuan's apt repo merger
HTML git clone git://parazyd.org/amprolla.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 3bdf425bcfaaa1fb294c003975863b588bde9e54
DIR parent 188ced9df163ef447cb43f05cbdcf576dca6f413
HTML Author: parazyd <parazyd@dyne.org>
Date: Tue, 18 Jul 2017 00:53:55 +0200
better populate_aliases.sh in contrib
Diffstat:
M contrib/populate_aliases.sh | 43 ++++++++++++++++++-------------
1 file changed, 25 insertions(+), 18 deletions(-)
---
DIR diff --git a/contrib/populate_aliases.sh b/contrib/populate_aliases.sh
t@@ -2,27 +2,34 @@
# helper script to be ran once after the initial mass merge in order
# to populate the structure with the needed symlinks
+dryrun=""
+[ "$1" = "-d" ] && dryrun="echo"
+
# make sure these correlate to lib/config.py
-REPO_ROOT=/srv/amprolla
+REPO_ROOT="/srv/amprolla"
-REPOS="
- backports
- proposed-updates
- security
- updates
-"
+PAIRS="
+ jessie 1.0
+ jessie stable
+ jessie-backports stable-backports
+ jessie-proposed-updates stable-proposed-updates
+ jessie-security stable-security
+ jessie-updates stable-updates
-cd "$REPO_ROOT"/merged-volatile/dists
+ ascii 2.0
+ ascii testing
+ ascii-backports testing-backports
+ ascii-proposed-updates testing-proposed-updates
+ ascii-security testing-security
+ ascii-updates testing-updates
-for i in $REPOS; do
- ln -snfv "ascii-$i" "testing-$i"
- ln -snfv "jessie-$i" "stable-$i"
-done
+ unstable ceres
+"
-ln -snfv "ascii" "testing"
-ln -snfv "jessie" "stable"
-ln -snfv "unstable" "ceres"
-ln -snfv "jessie" "1.0"
-ln -snfv "ascii" "2.0"
+$dryrun cd "$REPO_ROOT" || exit 1
-cd - >/dev/null
+echo "$PAIRS" | while read codename suite; do
+ [ -n "$codename" ] && [ -n "$suite" ] && [ $(echo "$codename" | grep -v '^#') ] && {
+ $dryrun ln -snfv "$codename" "$suite"
+ } || continue
+done