mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 75bdddb6efb00ce36cbbc258b8059c7e4579c758
parent 10a39202b2e85f2dcffc6ca1ecd6589efac09f63
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 21 Nov 2018 18:25:28 +0100

fix folder issue

Diffstat:
hierarchive | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hierarchive b/hierarchive @@ -2,6 +2,10 @@ set -e +# https://stackoverflow.com/a/246128 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd "$DIR" + # move old files from $1 to $2 # expected usage: download/upload folder of a web browser, scratch folder, etc. @@ -11,5 +15,5 @@ D=$(date '+%Y-%m-%d') F="$2/$D" mkdir "$F" cd "$1" -find -type f -mtime +$NDAYS -print0 | xargs -r -0 -n 1 hierarchive_file "$F" +find -type f -mtime +$NDAYS -print0 | xargs -r -0 -n 1 ./hierarchive_file "$F"