Improved support for Solaris, thanks to Sbonds.
This commit is contained in:
parent
8e11672952
commit
2aec933067
18
ppss
18
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."
|
||||||
|
if [[ "$ARCH" != "SunOS" ]]
|
||||||
|
then
|
||||||
|
$(exec_cmd "find $SRC_DIR/ -maxdepth 1 ! -type d" > "$LISTOFITEMS")
|
||||||
|
else
|
||||||
# SWB: -depth takes no arguments. I think he meant to use
|
# SWB: -depth takes no arguments. I think he meant to use
|
||||||
# -maxdepth to limit search to just the source directory
|
# -maxdepth to limit search to just the source directory
|
||||||
# (But that won't work on Solaris.) Try the -prune workaround
|
# (But that won't work on Solaris.) Try the -prune workaround
|
||||||
##$(exec_cmd "find $SRC_DIR/ -maxdepth 1 ! -type d" > "$LISTOFITEMS")
|
|
||||||
# Use this to work around a problem using -name with an
|
# Use this to work around a problem using -name with an
|
||||||
# embedded / when SRC_DIR is more than one level deep.
|
# embedded / when SRC_DIR is more than one level deep.
|
||||||
_dir_basename=`basename "$SRC_DIR"`
|
_dir_basename=`basename "$SRC_DIR"`
|
||||||
$(exec_cmd "find \"$SRC_DIR\" ( ! -name \"$_dir_basename\" -o -type f ) -prune -type f -print" > "$LISTOFITEMS")
|
$(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."
|
||||||
|
if [[ "$ARCH" != "SunOS" ]]
|
||||||
|
then
|
||||||
|
$(find "$SRC_DIR"/ -maxdepth 1 ! -type d >> "$LISTOFITEMS")
|
||||||
|
else
|
||||||
|
#
|
||||||
# SWB: see above depth vs. maxdepth comment and Solaris
|
# SWB: see above depth vs. maxdepth comment and Solaris
|
||||||
# brain-deadness workaround.
|
# brain-deadness workaround.
|
||||||
##$(find "$SRC_DIR"/ -maxdepth 1 ! -type d >> "$LISTOFITEMS")
|
|
||||||
# Use this to work around a problem using -name with an
|
# Use this to work around a problem using -name with an
|
||||||
# embedded / when SRC_DIR is more than one level deep.
|
# embedded / when SRC_DIR is more than one level deep.
|
||||||
_dir_basename=`basename "$SRC_DIR"`
|
_dir_basename=`basename "$SRC_DIR"`
|
||||||
$(find "$SRC_DIR" \( ! -name "$_dir_basename" -o -type f \) -prune -type f -print > "$LISTOFITEMS")
|
$(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