#!/bin/sh
set -e

. optvars

for FILE in $*
do
    # get the absolute path of the directory
    # WARNING: for N900, getting the optpath doesn't work, therefore the below commented out, as it doesn't have bash, use absolute paths for directories to optlink
    SELF_PATH=`optpath $FILE`
    APPDIR=$SELF_PATH
#    touch $APPDIR/.nonlinked
#    echo "Touched $APPDIR/.nonlinked."
    $KUMATUXDELETE/unlink.sh $APPDIR
    echo "Deleted $KUMATUXETC/ links for $APPDIR."
done
