removeit() { FILEPATH=$LSWSHOME/$LSFILE.$NEWVER if [ -f $FILEPATH ] || [ -d $FILEPATH ]; then echo "Removing $FILEPATH" rm -rf $FILEPATH else if [ $LSFILE != "modules" ]; then echo "$FILEPATH does not exist." fi fi } testit() { FILEPATH=$LSWSHOME/$LSFILE.$NEWVER if [ ! -f $FILEPATH ] && [ ! -d $FILEPATH ] && [ $LSFILE != "modules" ] && [ $LSFILE != "BUILD" ]; then echo "[ERROR] $FILEPATH does not exist, please run installer again." exit 3 fi } switchit() { FILEPATH=$LSWSHOME/$LSFILE if [ $LSFILE != "modules" ] || [ -d $FILEPATH.$NEWVER ]; then rm -f $FILEPATH FILENAME=`basename $FILEPATH` ln -sf "./$FILENAME.$NEWVER" "$FILEPATH" fi } CURDIR=`dirname "$0"` cd $CURDIR CURDIR=`pwd` LSWSHOME=`dirname $CURDIR` LSWSHOME=`dirname $LSWSHOME` if [ "x-d" = "x$1" ]; then ACTION="del" shift fi if [ "x$1" = "x" ]; then cat < $LSWSHOME/VERSION exit 0