Browse Source

provision.pl - added flag to pull from non-prod branch

master
gashapwn 3 years ago
parent
commit
508bbee90b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      perl-script/provision.pl

+ 4
- 1
perl-script/provision.pl View File

@@ -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…
Cancel
Save