探测 boot 脚本是否存在于 package.json 里

This commit is contained in:
luk.lu
2021-07-22 16:38:47 +08:00
parent f2809ad31a
commit 7251918b03
5 changed files with 66 additions and 28 deletions

View File

@@ -37,7 +37,7 @@ do
cd $org;
for repo in `ls .`
do
if [ -f $repo/package.json ]
if ( [ -f $repo/package.json ] && grep -q '"boot"' $repo/package.json )
then
echo '>>>>>> npm booting: ' $org/$repo
cd $repo
@@ -49,16 +49,3 @@ do
fi
done
popd
get_char()
{
SAVEDSTTY=`stty -g`
stty -echo
stty cbreak
dd if=/dev/tty bs=1 count=1 2> /dev/null
stty -raw
stty echo
stty $SAVEDSTTY
}
echo "Press any key to exit!"
char=`get_char`