File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 59
59
60
60
# Core module that is required first.
61
61
core_modules.sh () {
62
+ # Check that git branch exists.
63
+ if [ " ${remotereponame} " == " GitHub" ]; then
64
+ branchexistscheck=$( curl -s -o /dev/null -w " %{http_code}" " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null)
65
+ else
66
+ branchexistscheck=$( curl -s -o /dev/null -w " %{http_code}" " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null)
67
+ fi
68
+
69
+ if [ " ${branchexistscheck} " != " 200" ]; then
70
+ echo -e " ${githubbranch} branch does not exist. Defaulting to master branch."
71
+ githubbranch=" master"
72
+ fi
73
+
74
+ # Fetches the core modules required before passed off to core_dl.sh.
62
75
modulefile=" ${FUNCNAME[0]} "
63
76
fn_bootstrap_fetch_file_github " lgsm/modules" " core_modules.sh" " ${modulesdir} " " chmodx" " run" " noforcedl" " nomd5"
64
77
}
@@ -320,18 +333,6 @@ fn_install_file() {
320
333
exit
321
334
}
322
335
323
- # Check that git branch exists.
324
- if [ " ${remotereponame} " == " GitHub" ]; then
325
- branchexistscheck=$( curl -s -o /dev/null -w " %{http_code}" " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null)
326
- else
327
- branchexistscheck=$( curl -s -o /dev/null -w " %{http_code}" " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null)
328
- fi
329
-
330
- if [ " ${branchexistscheck} " != " 200" ]; then
331
- echo -e " ${githubbranch} branch does not exist. Defaulting to master branch."
332
- githubbranch=" master"
333
- fi
334
-
335
336
# Prevent LinuxGSM from running as root. Except if doing a dependency install.
336
337
if [ " $( whoami) " == " root" ] && [ ! -f /.dockerenv ]; then
337
338
if [ " ${userinput} " == " install" ] || [ " ${userinput} " == " auto-install" ] || [ " ${userinput} " == " i" ] || [ " ${userinput} " == " ai" ]; then
You can’t perform that action at this time.
0 commit comments