#!/bin/sh # filename: mklinks # # purpose : create links in current working dir # # argument: dir with images # # notes : doesn't like spaces in names # # check on argument if [ "$1" = "" ]; then echo "usage: mklinks " exit 1 fi # get list of all files FILES="$1/*" # make links to each file for FILE in $FILES do LINKNAME=`medcon -f $FILE --echo-alias-name` if [ $? -eq 0 ]; then ln -s $FILE $LINKNAME else echo "warning: no link created for $FILE" fi done