File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 5
5
# Website: https://linuxgsm.com
6
6
# Description: Installs nodejs and gamedig
7
7
8
- if [ " $( command -v node) " ] && [ " $( node -v | cut -d ' v' -f 2 | cut -d ' .' -f 1) " -ge 16 ] && [ ! -f " ${lgsmdir} /node_modules/gamedig/bin/gamedig.js" ]; then
8
+ if [ " $( command -v node) " ] && [ " $( command -v npm ) " ] && [ " $( node -v | cut -d ' v' -f 2 | cut -d ' .' -f 1) " -ge 16 ] && [ ! -f " ${lgsmdir} /node_modules/gamedig/bin/gamedig.js" ]; then
9
9
echo -e " "
10
10
echo -e " ${bold}${lightyellow} Installing Gamedig${default} "
11
11
fn_script_log_info " Installing Gamedig"
12
12
cd " ${lgsmdir} " || exit
13
13
curl -L -o package.json " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /package.json"
14
14
npm install
15
- elif [ " $( command -v node) " ] && [ " $( node -v | cut -d ' v' -f 2 | cut -d ' .' -f 1) " -ge 16 ]; then
15
+ elif [ " $( command -v node) " ] && [ " $( command -v npm ) " ] && [ " $( node -v | cut -d ' v' -f 2 | cut -d ' .' -f 1) " -ge 16 ]; then
16
16
cd " ${lgsmdir} " || exit
17
17
curl -s -L -o package.json " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /package.json"
18
18
npm update > /dev/null 2>&1
You can’t perform that action at this time.
0 commit comments