provision.pl - added flag to pull from non-prod branch
This commit is contained in:
parent
b0a547308f
commit
508bbee90b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user