change === and >>> to ::*** and ***::

This commit is contained in:
Luk
2024-12-21 15:01:18 +08:00
parent c063e02f1e
commit edb1f40cf1
51 changed files with 285 additions and 299 deletions

View File

@@ -5,8 +5,8 @@ then
ROOTPATH=$1
else
echo ""
echo "#<<< Enter [root path] or [leave blank] for default to [[`pwd`]]"
read -p "#>>> " ROOTPATH
echo "::*** Enter [root path] or [leave blank] for default to [[`pwd`]]"
read -p "***:: " ROOTPATH
if [ ! "$ROOTPATH" ]
then
ROOTPATH=`pwd`
@@ -30,17 +30,17 @@ then
# for org in `ls -F | grep '/$' | grep -v '~'` ## 首先过滤出所有子目录,然后过滤出所有不含 ~ 的子目录。注意 for ??? in `ls ???` 是按照空行以及空格进行分割的,因此最后筛选出的目录名不能含有空格,否则就被分割成多个了。
ls -F | grep '/$' | grep -v '=' | while read org ## 换用这种方法,可以成功过滤出含有空格的完整目录名
do
echo "#<<<===== entering [[$ROOTPATH/$org]]"
echo "::******** entering [[$ROOTPATH/$org]]"
echo ""
cd "$org";
for repo in * ## for ??? in * 是分割成一个个目录名的,即使目录名含有空格
do
if ( [ -f "$repo/package.json" ] && grep -q '"boot"' "$repo/package.json" )
then
echo "<<<< npm booting: [[$org/$repo]] <<<<"
echo "::*** npm booting: [[$org/$repo]]"
cd "$repo"
npm run boot
echo "#>>>> npm booted: [[$org/$repo]] #>>>>"
echo "***:: npm booted: [[$org/$repo]]"
echo ""
cd ..
fi