Improved support for Solaris, thanks to Sbonds.
This commit is contained in:
parent
8e11672952
commit
2aec933067
40
ppss
40
ppss
|
@ -1851,15 +1851,18 @@ get_all_items () {
|
||||||
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
|
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
|
||||||
else
|
else
|
||||||
log DEBUG "Recursion is disabled."
|
log DEBUG "Recursion is disabled."
|
||||||
# SWB: -depth takes no arguments. I think he meant to use
|
if [[ "$ARCH" != "SunOS" ]]
|
||||||
# -maxdepth to limit search to just the source directory
|
then
|
||||||
# (But that won't work on Solaris.) Try the -prune workaround
|
$(exec_cmd "find $SRC_DIR/ -maxdepth 1 ! -type d" > "$LISTOFITEMS")
|
||||||
##$(exec_cmd "find $SRC_DIR/ -maxdepth 1 ! -type d" > "$LISTOFITEMS")
|
else
|
||||||
# Use this to work around a problem using -name with an
|
# SWB: -depth takes no arguments. I think he meant to use
|
||||||
# embedded / when SRC_DIR is more than one level deep.
|
# -maxdepth to limit search to just the source directory
|
||||||
_dir_basename=`basename "$SRC_DIR"`
|
# (But that won't work on Solaris.) Try the -prune workaround
|
||||||
$(exec_cmd "find \"$SRC_DIR\" ( ! -name \"$_dir_basename\" -o -type f ) -prune -type f -print" > "$LISTOFITEMS")
|
# Use this to work around a problem using -name with an
|
||||||
|
# embedded / when SRC_DIR is more than one level deep.
|
||||||
|
_dir_basename=`basename "$SRC_DIR"`
|
||||||
|
$(exec_cmd "find \"$SRC_DIR\" ( ! -name \"$_dir_basename\" -o -type f ) -prune ! -type d -print" > "$LISTOFITEMS")
|
||||||
|
fi
|
||||||
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
|
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1873,13 +1876,18 @@ get_all_items () {
|
||||||
check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
|
check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
|
||||||
else
|
else
|
||||||
log DEBUG "Recursion is disabled."
|
log DEBUG "Recursion is disabled."
|
||||||
# SWB: see above depth vs. maxdepth comment and Solaris
|
if [[ "$ARCH" != "SunOS" ]]
|
||||||
# brain-deadness workaround.
|
then
|
||||||
##$(find "$SRC_DIR"/ -maxdepth 1 ! -type d >> "$LISTOFITEMS")
|
$(find "$SRC_DIR"/ -maxdepth 1 ! -type d >> "$LISTOFITEMS")
|
||||||
# Use this to work around a problem using -name with an
|
else
|
||||||
# embedded / when SRC_DIR is more than one level deep.
|
#
|
||||||
_dir_basename=`basename "$SRC_DIR"`
|
# SWB: see above depth vs. maxdepth comment and Solaris
|
||||||
$(find "$SRC_DIR" \( ! -name "$_dir_basename" -o -type f \) -prune -type f -print > "$LISTOFITEMS")
|
# brain-deadness workaround.
|
||||||
|
# Use this to work around a problem using -name with an
|
||||||
|
# embedded / when SRC_DIR is more than one level deep.
|
||||||
|
_dir_basename=`basename "$SRC_DIR"`
|
||||||
|
$(find "$SRC_DIR" \( ! -name "$_dir_basename" -o -type f \) -prune ! -type d -print > "$LISTOFITEMS")
|
||||||
|
fi
|
||||||
check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
|
check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
|
||||||
fi
|
fi
|
||||||
if [[ ! -e "$LISTOFITEMS" ]]
|
if [[ ! -e "$LISTOFITEMS" ]]
|
||||||
|
|
Loading…
Reference in New Issue