This commit is contained in:
luk.lu
2021-06-30 09:37:38 +08:00
parent 0bd55be72b
commit 7d38379698
4 changed files with 38 additions and 4 deletions

34
npm-boot-all.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
if [ $1 ]
then
FONPATH=$1
else
read -p "Enter path to npm boot (leave blank for default ./) >> " FONPATH
if [ ! $FONPATH ]
then
echo Use default path: ./
FONPATH=./
fi
fi
pushd $FONPATH
for org in `ls .`
do
if [ -d $org ]
then
cd $org;
for repo in `ls .`
do
if [ -d $repo/package.json ]
then
echo '>>>>>> npm booting: ' $org/$repo
cd $repo
npm run boot
cd ..
fi
done
cd ..;
fi
done
popd