exit 1
fi
-# Install
-rsync -av --delete $BASE/ $FOLDER/share/trashman/ || exit 1
+# Ensure folders exists and we have their absolute names
+FOLDER="`mkdir -p $FOLDER && cd $FOLDER > /dev/null && pwd`"
+BASE="`cd $BASE > /dev/null && pwd`"
+
+# Install if we're not already running the system-wide version
+if [ "$BASE" != "$FOLDER" ]; then
+ rsync -av --delete $BASE/ $FOLDER/share/trashman/ || exit 1
+fi
# Create symlink
( cd $FOLDER/bin && ln -sf $FOLDER/share/trashman/trashman ) || exit 1