From 858a31f6cf3188a9e3bb821a5c98aba24f0d1da4 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 4 Mar 2017 14:15:36 -0700 Subject: [PATCH] Update switch.sh --- debian/resources/switch.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/debian/resources/switch.sh b/debian/resources/switch.sh index 55b8e66..1236ac0 100644 --- a/debian/resources/switch.sh +++ b/debian/resources/switch.sh @@ -1,7 +1,13 @@ +#!/bin/sh +#move to script directory so all relative paths work +cd "$(dirname "$0")" -if [ .$USE_SWITCH_SOURCE = .true ]; then - if [ .$USE_SWITCH_MASTER = .true ]; then +#includes +. ./config.sh + +if [ .$switch_source = .true ]; then + if [ ."$switch_branch" = "master" ]; then resources/switch/source-master.sh else resources/switch/source-release.sh @@ -15,16 +21,17 @@ if [ .$USE_SWITCH_SOURCE = .true ]; then #systemd service resources/switch/source-systemd.sh +fi -else - if [ .$USE_SWITCH_MASTER = .true ]; then - if [ .$USE_SWITCH_PACKAGE_ALL = .true ]; then +if [ .$switch_package = .true ]; then + if [ ."$switch_branch" = "master" ]; then + if [ .$switch_package_all = .true ]; then resources/switch/package-master-all.sh else resources/switch/package-master.sh fi else - if [ .$USE_SWITCH_PACKAGE_ALL = .true ]; then + if [ .$switch_package_all = .true ]; then resources/switch/package-all.sh else resources/switch/package-release.sh @@ -39,5 +46,4 @@ else #systemd service resources/switch/package-systemd.sh - fi