From 7522c832867c25d3e5be31c8674bf608b164cc13 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 17 Feb 2013 22:29:53 -0500 Subject: [PATCH] added directory parameter. --- scripts/rev_control/report_new_files.sh | 12 ++++++++++-- scripts/rev_control/update_these.sh | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/scripts/rev_control/report_new_files.sh b/scripts/rev_control/report_new_files.sh index 6f2e2ecc..3fa08025 100644 --- a/scripts/rev_control/report_new_files.sh +++ b/scripts/rev_control/report_new_files.sh @@ -1,10 +1,16 @@ #!/bin/bash - - # a simple script for updating a set of folders on a usb stick from subversion or git. currently # just runs with no parameters and expects to get all archives from wherever the files originally # came from. + +dir="$1"; shift +if [ -z "$dir" ]; then + dir=. +fi + +pushd "$dir" + for i in * ; do if [ -d "$i" ]; then pushd $i @@ -15,3 +21,5 @@ for i in * ; do popd fi done + +popd diff --git a/scripts/rev_control/update_these.sh b/scripts/rev_control/update_these.sh index 97bf928e..cdd0119a 100644 --- a/scripts/rev_control/update_these.sh +++ b/scripts/rev_control/update_these.sh @@ -1,7 +1,16 @@ #!/bin/bash -# a simple script for updating a set of folders on a usb stick from subversion or git. currently +# a simple script for updating a set of folders on a usb stick from subversion or git. +# currently # just runs with no parameters and expects to get all archives from wherever the files originally # came from. + +dir="$1"; shift +if [ -z "$dir" ]; then + dir=. +fi + +pushd "$dir" + for i in * ; do if [ -d "$i" ]; then pushd $i @@ -16,3 +25,7 @@ for i in * ; do popd fi done + +popd + + -- 2.34.1