From 508bbee90b740525e687ead3a1fb9f7cf8a5654a Mon Sep 17 00:00:00 2001 From: gashapwn Date: Sat, 6 Mar 2021 23:48:20 +0000 Subject: [PATCH] provision.pl - added flag to pull from non-prod branch --- perl-script/provision.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-script/provision.pl b/perl-script/provision.pl index 6312a9d..5363531 100644 --- a/perl-script/provision.pl +++ b/perl-script/provision.pl @@ -12,7 +12,10 @@ use strict; # gashapwn # Nov 2020 +my $DEV_FLAG = shift || ""; + my $GIT_REPO = 'https://git.lain.church/gashapwn/lyadmin.git'; +my $GIT_BRANCH = length($DEV_FLAG) > 0 ? "-b gasha-branch " : ""; my ($REPO_DIR) = $GIT_REPO =~ /\/([^\/]*)\.git$/; my $INST_DIR = "/tilde"; @@ -103,7 +106,7 @@ system("chown $SVC_ACCT:$SVC_ACCT $INST_DIR"); chdir $INST_DIR; # clone repo -system("su $SVC_ACCT -c 'git clone $GIT_REPO'"); +system("su $SVC_ACCT -c 'git clone $GIT_BRANCH$GIT_REPO'"); chdir $REPO_DIR; # Copy the skel directory