diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 7c9b2e5..16f5d22 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -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/