#!/bin/bash
+# Copyright (C) 2014 Ian Kelling
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
# some basic sanity / verification
# I don't recommend actually running this unless you have a reason to,
done
}
-source ${0%/*}/../lnf-function
+PATH="$(readlink -f ${0%/*}/..):$PATH"
+
# might want to undo this if things go wrong
# set -x
set -E;
trap 'echo "${BASH_COMMAND:+BASH_COMMAND=\"$BASH_COMMAND\" }
${FUNCNAME:+FUNCNAME=\"$FUNCNAME\" }${LINENO:+LINENO=\"$LINENO\" }\$?=$?"' ERR
-cd $(mktemp -d)
+tempdir=$(mktemp -d)
+cd $tempdir
docases
# test again, using rm -rf in place of trash-put.
-# assumes that rm is in /bin and trash-put is in /usr/bin
-PATH="${PATH//:\/usr\/bin}"
-PATH="${PATH//\/usr\/bin:}"
+trash-put() { rm -rf -- "$@"; }
+export -f trash-put
docases
+rm -rf $tempdir
echo tests concluded