From bcc96e354af8c0088812a9444ea1cbc8efd0c386 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 7 Mar 2017 21:58:47 -0800 Subject: [PATCH] Fix branchname (#176) Do not assume is same as master on stone age versions of git --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index c49cfcf..5232aee 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -229,7 +229,7 @@ if [ "${AUTOUPDATE}" = "yes" ]; then warn "You have made changes to the plexupdate files, cannot auto update" else # Force FETCH_HEAD to point to the correct branch (for older versions of git which don't default to current branch) - if git fetch origin $BRANCHNAME --quiet && ! git diff --quiet FETCH_HEAD; then + if git fetch origin ${BRANCHNAME:-master} --quiet && ! git diff --quiet FETCH_HEAD; then info "Auto-updating..." # Use an associative array to store permissions. If you're running bash < 4, the declare will fail and we'll