diff options
Diffstat (limited to 'archive_an_image.sh')
-rw-r--r-- | archive_an_image.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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" |