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