From ef78a1e09912645b801cfbe9691abd1fcf308aa0 Mon Sep 17 00:00:00 2001 From: zaggash Date: Fri, 19 Feb 2016 17:15:04 +0100 Subject: [PATCH 1/7] Allow to clone DEV or MASTER branch --- init/30_install_update_plexpy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 7c9b2e5..3ab029e 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,6 +1,7 @@ #!/bin/bash - -[[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git /opt/plexpy && \ +[ $DEV ] && BRANCH="dev" || BRANCH="master" +echo "Cloning $BRANCH branch..." +[[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git --branch $BRANCH /opt/plexpy && \ chown -R abc:abc /config) # opt out for autoupdates From c21bbf8e07843dff7fe716bf421a1ae0683aa24f Mon Sep 17 00:00:00 2001 From: zaggash Date: Fri, 19 Feb 2016 18:40:51 +0100 Subject: [PATCH 2/7] Add quote in the if statement --- init/30_install_update_plexpy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 3ab029e..7fa27b7 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,5 +1,5 @@ #!/bin/bash -[ $DEV ] && BRANCH="dev" || BRANCH="master" +[ "$DEV" ] && BRANCH="dev" || BRANCH="master" echo "Cloning $BRANCH branch..." [[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git --branch $BRANCH /opt/plexpy && \ chown -R abc:abc /config) From 8b793e7e8e2c367edd4699fffd9d91f57243d9ee Mon Sep 17 00:00:00 2001 From: zaggash Date: Tue, 23 Feb 2016 11:39:48 +0100 Subject: [PATCH 3/7] Update 30_install_update_plexpy.sh --- init/30_install_update_plexpy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 7fa27b7..26b0cdd 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,5 +1,8 @@ #!/bin/bash -[ "$DEV" ] && BRANCH="dev" || BRANCH="master" +#If variable $ADVANCED_DEV_BRANCH, set branch to DEV, otherwise, default to master +[ "$ADVANCED_DEV_BRANCH" ] && BRANCH="dev" || BRANCH="master" +#Display Warning message +[ "$ADVANCED_DEV_BRANCH" ] && echo "BRANCH IS DEV, NO DOCKER SUPPORT WITH THIS BRANCH, THANKS" echo "Cloning $BRANCH branch..." [[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git --branch $BRANCH /opt/plexpy && \ chown -R abc:abc /config) From ab8b32fda40ddac15b83c30435573d38ab4b4e24 Mon Sep 17 00:00:00 2001 From: zaggash Date: Wed, 24 Feb 2016 14:59:06 +0100 Subject: [PATCH 4/7] Merge Lonix edit --- init/30_install_update_plexpy.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 26b0cdd..a23fc85 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,10 +1,11 @@ #!/bin/bash -#If variable $ADVANCED_DEV_BRANCH, set branch to DEV, otherwise, default to master -[ "$ADVANCED_DEV_BRANCH" ] && BRANCH="dev" || BRANCH="master" -#Display Warning message -[ "$ADVANCED_DEV_BRANCH" ] && echo "BRANCH IS DEV, NO DOCKER SUPPORT WITH THIS BRANCH, THANKS" -echo "Cloning $BRANCH branch..." -[[ ! -d /opt/plexpy/.git ]] && (git clone https://github.com/drzoidberg33/plexpy.git --branch $BRANCH /opt/plexpy && \ +#If variable $ADVANCED_GIT_BRANCH, set branch to DEV, otherwise, default to master +[ "$ADVANCED_GIT_BRANCH" ] && $GIT_BRANCH=$ADVANCED_GIT_BRANCH && \ +echo "BRANCH: $ADVANCED_GIT_BRANCH, Warning! This is unsupported."|| GIT_BRANCH="master" + + +[[ ! -d /opt/plexpy/.git ]] && (echo "Cloning $GIT_BRANCH branch..." && \ +git clone https://github.com/drzoidberg33/plexpy.git --branch $GIT_BRANCH /opt/plexpy && \ chown -R abc:abc /config) # opt out for autoupdates @@ -13,4 +14,3 @@ chown -R abc:abc /config) cd /opt/plexpy git pull chown -R abc:abc /config - From 51933c31b1aa640947b10a450a2d43911d1f4468 Mon Sep 17 00:00:00 2001 From: zaggash Date: Wed, 24 Feb 2016 15:01:58 +0100 Subject: [PATCH 5/7] Typo in comment --- init/30_install_update_plexpy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index a23fc85..40971d0 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,5 +1,5 @@ #!/bin/bash -#If variable $ADVANCED_GIT_BRANCH, set branch to DEV, otherwise, default to master +#If variable $ADVANCED_GIT_BRANCH, set branch to $GIT_BRANCH, otherwise, default to master [ "$ADVANCED_GIT_BRANCH" ] && $GIT_BRANCH=$ADVANCED_GIT_BRANCH && \ echo "BRANCH: $ADVANCED_GIT_BRANCH, Warning! This is unsupported."|| GIT_BRANCH="master" From 09c0869ac405973eb71c92e72d2c6f9a45e8b588 Mon Sep 17 00:00:00 2001 From: zaggash Date: Mon, 29 Feb 2016 10:59:02 +0100 Subject: [PATCH 6/7] Use a single variable. --- init/30_install_update_plexpy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 40971d0..57dbcaa 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,11 +1,11 @@ #!/bin/bash -#If variable $ADVANCED_GIT_BRANCH, set branch to $GIT_BRANCH, otherwise, default to master -[ "$ADVANCED_GIT_BRANCH" ] && $GIT_BRANCH=$ADVANCED_GIT_BRANCH && \ -echo "BRANCH: $ADVANCED_GIT_BRANCH, Warning! This is unsupported."|| GIT_BRANCH="master" +#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 $GIT_BRANCH branch..." && \ -git clone https://github.com/drzoidberg33/plexpy.git --branch $GIT_BRANCH /opt/plexpy && \ +[[ ! -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 /config) # opt out for autoupdates From 06938f7f9efa14d4809eaa50e3a63ef1a0cf0b28 Mon Sep 17 00:00:00 2001 From: zaggash Date: Tue, 8 Mar 2016 13:37:55 +0100 Subject: [PATCH 7/7] Edit chown orders --- init/30_install_update_plexpy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init/30_install_update_plexpy.sh b/init/30_install_update_plexpy.sh index 57dbcaa..16f5d22 100644 --- a/init/30_install_update_plexpy.sh +++ b/init/30_install_update_plexpy.sh @@ -1,16 +1,16 @@ #!/bin/bash +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 /config) +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/