populate_aliases.sh (1340B)
1 #!/bin/sh 2 # See LICENSE file for copyright and license details. 3 4 # Helper script to be ran once after the initial mass merge in 5 # order to populate the structure with the needed symlinks. 6 7 dryrun="" 8 [ "$1" = "-d" ] && dryrun="echo" 9 10 # make sure these correlate to lib/config.py 11 REPO_ROOT="${REPO_ROOT:-/srv/amprolla/merged}" 12 13 PAIRS=" 14 jessie 1.0 15 jessie oldstable 16 jessie-backports oldstable-backports 17 jessie-proposed-updates oldstable-proposed-updates 18 jessie-security oldstable-security 19 jessie-updates oldstable-updates 20 21 ascii 2.0 22 ascii stable 23 ascii-backports stable-backports 24 ascii-proposed-updates stable-proposed-updates 25 ascii-security stable-security 26 ascii-updates stable-updates 27 28 beowulf 3.0 29 beowulf testing 30 beowulf-backports testing-backports 31 beowulf-proposed-updates testing-proposed-updates 32 beowulf-security testing-security 33 beowulf-updates testing-updates 34 35 unstable ceres 36 " 37 38 $dryrun cd "$REPO_ROOT" || exit 1 39 40 echo "$PAIRS" | while read -r codename suite; do 41 if [ -n "$codename" ] && [ -n "$suite" ]; then 42 if echo "$codename" | grep -qv '^#'; then 43 $dryrun ln -snfv "$codename" "$suite" 44 fi 45 fi 46 done