aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <mutantturke@gmail.com>2012-06-11 16:37:10 -0400
committermutantturkey <mutantturke@gmail.com>2012-06-11 16:37:10 -0400
commitbc2747f47bc2153642da518ea8afa7f5b4859819 (patch)
tree10944957f7c227b1c5bbcaed41c4d65de1588e8e
parentb4e24f80fb798e9a26f40aa214c1966db90982f3 (diff)
basic setup
-rwxr-xr-x[-rw-r--r--]batch-process63
1 files changed, 62 insertions, 1 deletions
diff --git a/batch-process b/batch-process
index 829303e..573295a 100644..100755
--- a/batch-process
+++ b/batch-process
@@ -1,3 +1,64 @@
-#!/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