turn off f24 build
[infrastructure.git] / scripts / sfa-stable-debian.sh
index f6a01d5..1d1a281 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # usage e.g. $0 1.0-20
 [[ -z "$@" ]] && { echo Usage $0 stable ; exit 1 ; }
 stable=$1; shift
@@ -6,8 +6,9 @@ stable=$1; shift
 stable=$(echo $stable | sed -e s,/,,g)
 stabledot=$(echo $stable | sed -e s,-,.,g)
 for dir in $(ls -d $stable/*[24]) ; do
-  base=$(echo $dir | sed -e s,/,,g -e s,--,,g -e s,sfa-,,g -e s,$stabledot,,g)
-  stablelink="stable-$base"
+  base=$(echo $dir | sed -e s,$stable,,g -e s,$stabledot,,g -e s,/sfa--,,g)
+  version=$(echo $dir | cut -c1)
+  stablelink="stable-sfa$version-$base"
   echo Linking $stablelink to $dir
   [ -h $stablelink ] && rm $stablelink
   [ -e $stablelink ] && { echo "found not-a-link $base - ignored" ; continue  ; }