From: Steven Baltakatei Sandoval Date: Tue, 23 Mar 2021 12:41:00 +0000 (+0000) Subject: fix(unitproc:bktemp-initGitRepo):Fix repoDir X-Git-Tag: 0.4.3 X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/8e8278edfe895270172f5bd6e6fbf373241d65ca fix(unitproc:bktemp-initGitRepo):Fix repoDir --- diff --git a/unitproc/bktemp-initGitRepo b/unitproc/bktemp-initGitRepo index e5d117c..905e929 100644 --- a/unitproc/bktemp-initGitRepo +++ b/unitproc/bktemp-initGitRepo @@ -31,7 +31,7 @@ initGitRepo() { # arg2: repoDir # arg3: remoteName # arg4: branchName - # Version: 0.0.4 + # Version: 0.0.5 # Depends: checkURL() 0.0.2, yell(), Bash 5.0.3 # Ref/Attrib: [1]: Test for space-less alphanuemric string. https://unix.stackexchange.com/a/416120 # [2]: Test for argument count. https://stackoverflow.com/q/18568706 @@ -45,6 +45,9 @@ initGitRepo() { if checkURL "$arg1"; then repoURL="$arg1"; else yell "ERROR:Not a valid URL:$arg1"; return 1; fi; + # Passthrough repoDir (it may not exist yet) + repoDir="$arg2"; + # Validate remoteName if [[ "$arg3" =~ ^[[:alnum:]]+$ ]]; then remoteName="$arg3"; else yell "ERROR:Not a valid remote name:$arg3"; return 1; fi; # See [1].