aboutsummaryrefslogtreecommitdiff
path: root/scripts/batch-process
diff options
context:
space:
mode:
authormutantturkey <mutantturke@gmail.com>2012-06-20 16:06:12 -0400
committermutantturkey <mutantturke@gmail.com>2012-06-20 16:06:12 -0400
commita4a83a85377e184cccb01c1f2f2455a6412fa527 (patch)
treebd49413d65d6d8c1fdeb96ff4006f615883d6c2c /scripts/batch-process
parent6364ef1edf20ca9e5c869d6e66ae87a6b635675d (diff)
created scripts directory
Diffstat (limited to 'scripts/batch-process')
-rwxr-xr-xscripts/batch-process67
1 files changed, 67 insertions, 0 deletions
diff --git a/scripts/batch-process b/scripts/batch-process
new file mode 100755
index 0000000..bdd67a9
--- /dev/null
+++ b/scripts/batch-process
@@ -0,0 +1,67 @@
+#!/bin/sh
+usage()
+{
+cat << EOF
+usage: $0 options
+
+OPTIONS:
+ -h Show this message
+ -i Input file
+ -V verbose mode
+
+Input file should contain the following format:
+
+VideoType:VideoLocation:StartNumber:CropList
+
+Ex First10MinSet:/path/to/video/First10MinGroup8:68:First10MinGroup8CropList.txt
+
+Copyright 2012 Calvin Morrison
+EOF
+}
+
+function log () {
+ if [[ $verbose -eq 1 ]]; then
+ echo "$@"
+ fi
+}
+
+# Declaration of Variables
+verbose=
+input_file=
+
+while getopts "Vhi:" OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ exit 1
+ ;;
+ V)
+ verbose=1
+ ;;
+ i)
+ input_file=$OPTARG
+ ;;
+ ?)
+ usage
+ exit
+ ;;
+ esac
+done
+
+
+if [[ -z $input_file ]]
+then
+ usage
+ exit 1
+fi
+
+if [ -f "$input_file" ]; then
+ log "$input_file exists."
+else
+ echo "error: $input_file was not found"
+ exit 1
+fi
+
+
+