From 68f789efb66b2bf2717d97241701e7051b9e0fea Mon Sep 17 00:00:00 2001 From: Patrick Darley Date: Mon, 14 Sep 2015 13:02:40 +0000 Subject: a script to archive generated images --- archive_an_image.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 archive_an_image.sh (limited to 'archive_an_image.sh') diff --git a/archive_an_image.sh b/archive_an_image.sh new file mode 100644 index 0000000..aec6c60 --- /dev/null +++ b/archive_an_image.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Script to archive an image generated by the ciat pipeline + +img_path="$1" +archive_dir=/archive/images + +# Create am archive directory based on the img date +img_date=`date -r "$img_path" +"%y-%m-%d_%H%M"` +archive_path="$archive_dir$img_date" +mkdir -p "$archive_path" + +# Move the img to the archive +mv "$img_path" "$archive_path" -- cgit v1.2.1