-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevUpdateNode.sh
More file actions
executable file
·27 lines (27 loc) · 895 Bytes
/
devUpdateNode.sh
File metadata and controls
executable file
·27 lines (27 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/bash
#
# Updates to the NPM/Node Environment This needs to be done in each directory
#
# directories that need puppeteer or xml-parser use:
for package in $(ls */package.json); do
echo found $package
dir=$(dirname $package)
(
cd $dir
echo "##### $dir"
if grep puppeteer package.json; then
grep puppeteer package-lock.json >/dev/null || npm install puppeteer
fi
if grep fast-xml-parser package.json; then
grep fast-xml-parser package-lock.json >/dev/null || npm install fast-xml-parser
fi
if grep node-html-parser package.json; then
grep node-html-parser package-lock.json >/dev/null || npm install node-html-parser
fi
npm outdated || npm update
echo
)
done
echo Make sure all bash files are executable.
echo 'chmod +x *.sh */*.sh'
chmod +x *.sh */*.sh