PPSS now processes directories recursive\!\!\!

This commit is contained in:
Louwrentius 2010-02-07 21:33:27 +00:00
parent bd97eed1ea
commit a9b4eac886
2 changed files with 6 additions and 6 deletions

6
ppss
View File

@ -1200,12 +1200,12 @@ get_all_items () {
then then
if [ ! -z "$SSH_SERVER" ] # Are we running stand-alone or as a slave?" if [ ! -z "$SSH_SERVER" ] # Are we running stand-alone or as a slave?"
then then
ITEMS=`exec_cmd "ls -1 $SRC_DIR"` ITEMS=`exec_cmd "find $SRC_DIR -type f"`
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory." check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
else else
if [ -e "$SRC_DIR" ] if [ -e "$SRC_DIR" ]
then then
ITEMS=`ls -1 $SRC_DIR` ITEMS=`find $SRC_DIR -type f`
else else
ITEMS="" ITEMS=""
fi fi
@ -1401,7 +1401,7 @@ commando () {
then then
log DEBUG "Using item straight from the server." log DEBUG "Using item straight from the server."
else else
ITEM="$SRC_DIR/$ITEM" ITEM="$ITEM"
fi fi
else else
ITEM="./$PPSS_LOCAL_TMPDIR/$ITEM_NO_PATH" ITEM="./$PPSS_LOCAL_TMPDIR/$ITEM_NO_PATH"

View File

@ -3,7 +3,7 @@
DEBUG="$1" DEBUG="$1"
VERSION=2.55 VERSION=2.55
TMP_DIR="ppss" TMP_DIR="ppss"
PPSS=./ppss PPSS=./ppss_new
PPSS_DIR=ppss_dir PPSS_DIR=ppss_dir
cleanup () { cleanup () {
@ -98,7 +98,7 @@ testSpacesInFilenames () {
createDirectoryWithSomeFiles createDirectoryWithSomeFiles
RES=$( { ./$PPSS -d /tmp/$TMP_DIR -c 'ls -alh ' >> /dev/null ; } 2>&1 ) RES=$( { ./$PPSS -d /tmp/$TMP_DIR -c 'ls -alh ' >> log.txt ; } 2>&1 )
assertEquals "PPSS did not execute properly." 0 "$?" assertEquals "PPSS did not execute properly." 0 "$?"
assertNull "PPSS retured some errors..." "$RES" assertNull "PPSS retured some errors..." "$RES"
@ -116,7 +116,7 @@ testSpacesInFilenames () {
testSpecialCharacterHandling () { testSpecialCharacterHandling () {
RES=$( { ./$PPSS -f "$INPUTFILESPECIAL" -c 'echo ' >> /dev/null ; } 2>&1 ) RES=$( { ./$PPSS -f "$INPUTFILESPECIAL" -c 'echo ' >> log.txt ; } 2>&1 )
assertEquals "PPSS did not execute properly." 0 "$?" assertEquals "PPSS did not execute properly." 0 "$?"
assertNull "PPSS retured some errors..." "$RES" assertNull "PPSS retured some errors..." "$RES"