X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fsfa-stable-debian.sh;h=1d1a281f857e0672c3b88b0ae49d672c855989a7;hb=794baa4e0667d36a6bf1462ec7f4a3f2c99e65bc;hp=e5359780c86a1237d2de58dc9c62aa417cb9f105;hpb=225d78afd08ad382b3e20152dc94c71a7c206b8e;p=infrastructure.git diff --git a/scripts/sfa-stable-debian.sh b/scripts/sfa-stable-debian.sh index e535978..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 @@ -7,7 +7,8 @@ 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,$stable,,g -e s,$stabledot,,g -e s,/sfa--,,g) - stablelink="stable-$base" + 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 ; }