-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_all_videos_with_env
executable file
·55 lines (45 loc) · 1.31 KB
/
index_all_videos_with_env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
SCRIPTDIR=$( (cd -P $(dirname $0) && pwd) )
corename=videos
BASEDIR=$SCRIPTDIR/common
# load the shared bash functions log, vlog and Verbose
. $BASEDIR/outputfuncs.bash $BASEDIR
verbose=
force=
test=
index=staging:production
while getopts :vfti: opt
do
case $opt in
v) verbose=-v;;
t) test=-t;;
f) force=-f;;
i) index=$OPTARG
esac
done
shift $((OPTIND-1))
if [ "$force" == "-f" ] ; then
Verbose "Forcing index rebuild with -f flag"
fi
if [ "$AWS_ACCESS_KEY_ID" == "" ] ; then
Echo "environment variable AWS_ACCESS_KEY_ID must be defined"
exit 1
fi
if [ "$AWS_SECRET_ACCESS_KEY" == "" ] ; then
Echo "environment variable AWS_SECRET_ACCESS_KEY must be defined"
exit 1
fi
#if [ "$AWS_DEFAULT_REGION" == "" ] ; then
# Echo "environment variable AWS_DEFAULT_REGION must be defined"
# exit 1
#fi
if [ "$AWS_REGION" == "" ] ; then
Echo "environment variable AWS_REGION must be defined"
exit 1
fi
#mkdir -p $SCRIPTDIR/results
Verbose " "
Verbose "Starting update of Virgo4 index for Video items "`/bin/date "+%Y-%m-%d_%H:%M"`
$SCRIPTDIR/kanopy/updateifnewer $verbose $test $force -i $index
$SCRIPTDIR/swank/updateifnewer $verbose $test $force -i $index
Verbose "Finished update of Virgo4 index for Video items "`/bin/date "+%Y-%m-%d_%H:%M"`