#!/bin/bash if [ $# -eq 0 ] then echo "You must provide a version number to link to:" echo " $0 1.1-3" echo "" exit 1 fi version=$1 echo "-----" rm -fv *\.[0-9]-* echo "-----" # for newer installers that expect a filename with name-version.ext for f in /ftp/pub/qubeInstaller/$version/qubeInstaller-$version.*; do ln -sfv $f `basename $f | sed 's/-[0-9]\.[0-9]-[a-z0-9]*\./\./g'`; done # for older installers that expect a filename with name.version.ext for f in /ftp/pub/qubeInstaller/$version/qubeInstaller-$version.*; do ln -sfv $f `basename $f | sed 's/-/\./2'`; done echo "-----" # so you don't have to update the website with ever release - a versionless symlink for f in `ls -l qube* | awk '{print $11;}'`; do ln -sv $f; done