fi
}
+#------------------------------------------------------------------------------
+CP() {
+ local cmd="cp"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
+ fi
+ if [[ "${SIMULATE}" == "y" ]] ; then
+ debug "Simulate executing: ${cmd} $*"
+ return
+ fi
+ eval ${cmd} "$@"
+}
+
+#------------------------------------------------------------------------------
+CP_force() {
+ local cmd="cp"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
+ fi
+ debug "Executing: ${cmd} $*"
+ eval ${cmd} "$@"
+}
+
#------------------------------------------------------------------------------
MV() {
local cmd="mv"
cmd+=" --verbose"
fi
if [[ "${SIMULATE}" == "y" ]] ; then
- info "Executing: ${cmd} $*"
+ debug "Simulate executing: ${cmd} $*"
return
fi
eval ${cmd} "$@"
}
+#------------------------------------------------------------------------------
+MV_force() {
+ local cmd="mv"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
+ fi
+ debug "Executing: ${cmd} $*"
+ eval ${cmd} "$@"
+}
+
#------------------------------------------------------------------------------
RM() {
+ local cmd="rm"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
+ fi
if [[ "${SIMULATE}" == "y" ]] ; then
- debug "Simulated removing of: $*"
+ debug "Simulate executing: ${cmd} $*"
return
fi
- if [[ "${VERBOSE}" != "y" ]] ; then
- rm "$@"
- else
- rm --verbose "$@"
- fi
+ eval ${cmd} "$@"
}
#------------------------------------------------------------------------------
RM_force() {
- if [[ "${VERBOSE}" != "y" ]] ; then
- rm --force "$@"
- else
- rm --force --verbose "$@"
+ local cmd="rm --force"
+ if [[ "${VERBOSE}" == "y" ]] ; then
+ cmd+=" --verbose"
fi
+ debug "Executing: ${cmd} $*"
+ eval ${cmd} "$@"
}