summaryrefslogtreecommitdiff
path: root/automated/lib
diff options
context:
space:
mode:
Diffstat (limited to 'automated/lib')
-rwxr-xr-xautomated/lib/sh-test-lib9
1 files changed, 9 insertions, 0 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index 9030899..299964d 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -326,3 +326,12 @@ add_repo() {
;;
esac
}
+
+create_out_dir() {
+ [ -z "$1" ] && error_msg "Usage: create_out_dir output_dir"
+ OUTPUT=$1
+ [ -d "${OUTPUT}" ] &&
+ mv "${OUTPUT}" "${OUTPUT}_$(date -r "${OUTPUT}" +%Y%m%d%H%M%S)"
+ mkdir -p "${OUTPUT}"
+ [ -d "${OUTPUT}" ] || error_msg "Could not create output directory ${OUTPUT}"
+}