chiark / gitweb /
dgit: import-dsc: Parse `Dgit:' field properly, using only \w+
[dgit.git] / tests / lib-reprepro
index 87020444f8aa182614bc03e1ab9394f093fb1586..af331432a6820ed15ed4483f4188a6c90de375da 100644 (file)
@@ -36,15 +36,17 @@ t-reprepro-setup () {
 
        exec 3>$rrc/distributions
 
-       local arch=`dpkg --print-architecture`
+       local arch; arch=`dpkg --print-architecture`
 
        for suitespec in $suitespecs; do
                local suite=${suitespec%%:*}
                local sname=${suitespec#*:}
 
-               mkdir $tmp/mirror/dists
-               rm -f $tmp/mirror/dists/$sname
-               ln -s $suite $tmp/mirror/dists/$sname
+               mkdir -p $tmp/mirror/dists
+               if [ $sname != $suite ]; then
+                       rm -f $tmp/mirror/dists/$sname
+                       ln -s $suite $tmp/mirror/dists/$sname
+               fi
 
                cat >&3 <<END
 Suite: $sname