Skip to content

Commit

Permalink
Update 950_dp_save_result_files.sh
Browse files Browse the repository at this point in the history
No longer use the StopIfError function but plain bash "COMMAND || Error"
cf. daf35e2
  • Loading branch information
jsmeix committed Jul 6, 2020
1 parent c80333e commit f49e022
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions usr/share/rear/output/DP/default/950_dp_save_result_files.sh
@@ -1,8 +1,7 @@
# 950_dp_save_result_files.sh
# Saving result files via Data Protector

[ ${#RESULT_FILES[@]} -gt 0 ]
StopIfError "No files to copy (RESULT_FILES is empty)"
[ ${#RESULT_FILES[@]} -gt 0 ] || Error "No files to copy (RESULT_FILES is empty)"

LogPrint "Saving result files with Data Protector"
#DP_RESULT_FILES=()
Expand All @@ -11,9 +10,7 @@ LogPrint "Saving result files with Data Protector"
test -z "$DP_RESULT_FILES_PATH" && DP_RESULT_FILES_PATH="$VAR_DIR/rescue"

if ! test -d "$DP_RESULT_FILES_PATH" ; then
mkdir -p $v "$DP_RESULT_FILES_PATH" >&2
StopIfError "Could not create '$DP_RESULT_FILES_PATH'"
mkdir -p $v "$DP_RESULT_FILES_PATH" || Error "Could not create '$DP_RESULT_FILES_PATH'"
fi

cp -r $v "$VAR_DIR/recovery" "$DP_RESULT_FILES_PATH" >&2
StopIfError "Could not save result files with Data Protector"
cp -r $v "$VAR_DIR/recovery" "$DP_RESULT_FILES_PATH" || Error "Could not save result files with Data Protector"

0 comments on commit f49e022

Please sign in to comment.