3 [[ -z "$@" ]] && { echo Usage $0 stable ; exit 1 ; }
5 [[ -n "$@" ]] && { echo Usage $0 stable ; exit 1 ; }
6 stable=$(echo $stable | sed -e s,/,,g)
7 for dir in $(ls -d $stable/*[24]) ; do
8 base=$(echo $dir | sed -e s,/,,g -e s,--,,g -e s,sfa-,,g -e s,$stable,,g)
9 stablelink="stable-$base"
10 echo Linking $stablelink to $dir
11 [ -h $stablelink ] && rm $stablelink
12 [ -e $stablelink ] && { echo "found not-a-link $base - ignored" ; continue ; }
13 ln -s $dir $stablelink