X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fsfa-stable-debian.sh;h=1d1a281f857e0672c3b88b0ae49d672c855989a7;hb=298556080265cd228ccc9c0d3d8226cfa975dad8;hp=f6a01d570268c4ffbfce66b7320818f020e499d2;hpb=5ae632070a0ae4f3fb0b1d112c97f8a4fc74b472;p=infrastructure.git diff --git a/scripts/sfa-stable-debian.sh b/scripts/sfa-stable-debian.sh index f6a01d5..1d1a281 100755 --- a/scripts/sfa-stable-debian.sh +++ b/scripts/sfa-stable-debian.sh @@ -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 ; }