Do not hardcode debian specifics in staticsync scripts, make them use a conffile
[mirror/dsa-puppet.git] / modules / roles / files / static-mirroring / static-mirror-run-all
index b85948f..c6aea0c 100755 (executable)
 
 set -u
 
+. /etc/staticsync.conf
+if ! [ -n "$base" ]; then
+  echo >&2 "base not configured!"
+  exit 1
+fi
+
 awk -v host="$(hostname -f)" '
   !/^ *(#|$)/ {
     split($6,ignorehosts,",")
@@ -36,5 +42,5 @@ awk -v host="$(hostname -f)" '
     print $1, $2
   }' /etc/static-components.conf |
   while read master component ; do
-    static-mirror-run --one-stage "/srv/static.debian.org/mirrors/$component" "$master:$component/-live-"
+    static-mirror-run --one-stage "$base/mirrors/$component" "$master:$component/-live-"
   done