Merge pull request #11 from zaggash/patch-1

Allow to clone DEV or MASTER branch
This commit is contained in:
Stian Buch Larsen 2016-03-18 07:05:05 +01:00
commit 57efd8361d

View File

@ -1,12 +1,16 @@
#!/bin/bash
chown -R abc:abc /config
[[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git /opt/plexpy && \
chown -R abc:abc /config)
#If variable $ADVANCED_GIT_BRANCH, set branch to $ADVANCED_GIT_BRANCH, otherwise, default to master
[ "$ADVANCED_GIT_BRANCH" ] && \
echo "BRANCH: $ADVANCED_GIT_BRANCH, Warning! This is unsupported." || ADVANCED_GIT_BRANCH="master"
[[ ! -d /opt/plexpy/.git ]] && (echo "Cloning $ADVANCED_GIT_BRANCH branch..." && \
git clone https://github.com/drzoidberg33/plexpy.git --branch $ADVANCED_GIT_BRANCH /opt/plexpy && \
chown -R abc:abc /opt/plexpy/)
# opt out for autoupdates
[ "$ADVANCED_DISABLEUPDATES" ] && exit 0
cd /opt/plexpy
git pull
chown -R abc:abc /config
chown -R abc:abc /opt/plexpy/