Commit 9ec9c851 authored by Klaatu's avatar Klaatu

using basename to correct a path error, corrected find syntax.

parent e15cf986
......@@ -7,8 +7,9 @@ if [ "X$OS" == "XDarwin" ]
else INSTDIR=/usr/local/bin
fi
cp -fv ./trash $INSTDIR/trash
chmod +x $INSTDIR/trash
cp -fv ./trashy $INSTDIR
chmod +x $INSTDIR/trashy || exit 1
ln -s $INSTDIR/trashy $INSTDIR/trash
########################################
### uncomment the block below if you ###
......
#!/bin/bash
VERSION=1.0
VERSION=1.2
# trash - the command line trashcan
#
# Copyright (C) 2011-13 Klaatu la Terible
......@@ -47,7 +47,7 @@ empty() {
fi
# process verbosity and dry-run options
$ACT $BASKET $KILL -mindepth 1
$ACT $BASKET -mindepth 1 $KILL
exit
}
......@@ -110,10 +110,10 @@ fi
# pitch it
if [ "X$ARG" != "X" ]; then
for waste in ${RUBBISH[*]} ; do
$ACT $VERBOSE "$( echo "${waste}" | sed 's%__+trash+__%\ %g' )" $BASKET/files/${waste} ;
echo "[Trash Info]" > $BASKET/info/${waste}.trashinfo
echo "Path="$(realpath "${waste}") >> $BASKET/info/${waste}.trashinfo
echo "DeletionDate=$(date +%Y-%m-%dT%T)" >> $BASKET/info/${waste}.trashinfo
$ACT $VERBOSE "$( echo "${waste}" | sed 's%__+trash+__%\ %g' )" $BASKET/files/`basename ${waste}` ;
echo "[Trash Info]" > $BASKET/info/`basename ${waste}.trashinfo`
echo "Path="$(realpath "${waste}") >> $BASKET/info/`basename ${waste}.trashinfo`
echo "DeletionDate=$(date +%Y-%m-%dT%T)" >> $BASKET/info/`basename ${waste}.trashinfo`
done
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment