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 stabledot=$(echo $stable | sed -e s,-,.,g)
8 for dir in $(ls -d $stable/*[24]) ; do
9 base=$(echo $dir | sed -e s,$stable,,g -e s,$stabledot,,g -e s,/sfa--,,g)
10 stablelink="stable-$base"
11 echo Linking $stablelink to $dir
12 [ -h $stablelink ] && rm $stablelink
13 [ -e $stablelink ] && { echo "found not-a-link $base - ignored" ; continue ; }
14 ln -s $dir $stablelink