forked from mediamicroservices/mm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmupdate
executable file
·19 lines (17 loc) · 1.39 KB
/
mmupdate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# mmupdate
# This script is only intended for use with computers that are not connceted to the internet to access github but need to efficiently install updates of mediamicroservices. A local path is setup via mmconfig and running 'mmupdate' will copy relavent files from that declared directory, $LOCAL_MM_DIR, to /usr/local/bin.
scriptdir=`dirname "${0}"`
. "${scriptdir}/mmfunctions" || { echo "Missing '${scriptdir}/mmfunctions'. Exiting." ; exit 1 ;};
[ -z "${LOCAL_MM_DIR}" ] && { echo "A local directory of mediamicoservice must be declared. Run mmconfig to set LOCAL_MM_DIR." ; exit 1 ;};
[ ! -d "${LOCAL_MM_DIR}" ] && { echo "mmupdate is configured to use $LOCAL_MM_DIR, which is not available. Run mmconfig to set LOCAL_MM_DIR." ; exit 1 ;};
for script in barcodeinterpret blackatends checksumpackage fix_left2stereo fix_rewrap fix_volume ingestfile ingestfile makebroadcast makedvd makeframes makelossless makemetadata makepodcast makeprores makeyoutube mmconfig mmfunctions mmhelp paperingest quickcompare removeDSStore uploadomneon xdcamingest mmupdate checksum2filemaker ; do
if [ -f "${LOCAL_MM_DIR}/${script}" ] ; then
rm "/usr/local/bin/${script}"
fi
cp -v -f -p "${LOCAL_MM_DIR}/${script}" /usr/local/bin/
done
if [ -d "${LOCAL_MM_DIR}/extra_installs/" ] ; then
cp -v -f -p "${LOCAL_MM_DIR}/extra_installs/"* /usr/local/bin/
fi
echo "Microservices have been updated."