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

View File

@ -3,7 +3,7 @@
@ IF "%1" == "" echo Using current folder as root folder
pushd %1
for /d %%d in (*) do pushd %%d & (for /d %%d in (*) do if exist %%d/.git (pushd %%d & echo [ Git Pulling %%d ... ] & git pull & popd)) & popd
for /d %%d in (*) do pushd %%d & (for /d %%d in (*) do if exist %%d/.git (pushd %%d & echo --- git pulling: %%d ... & git pull & popd)) & popd
popd
pause
@GOTO END

View File

@ -4,7 +4,7 @@ if [ $1 ]
then
FONPATH=$1
else
read -p "Enter path to pull (leave blank for default ./) >> " FONPATH
read -p "Enter path to git pull (leave blank for default ./) >> " FONPATH
if [ ! $FONPATH ]
then
echo Use default path: ./
@ -22,7 +22,7 @@ do
do
if [ -d $repo/.git ]
then
echo '>>>>>> git pull' $org/$repo
echo '>>>>>> git pulling: ' $org/$repo
cd $repo
git pull
cd ..

View File

@ -3,7 +3,7 @@
@ IF "%1" == "" echo Using current folder as root folder
pushd %1
for /d %%d in (*) do pushd %%d & (for /d %%d in (*) do if exist %%d/package.json (pushd %%d & echo [ npm booting %%d ... ] & npm run boot & popd)) & popd
for /d %%d in (*) do pushd %%d & (for /d %%d in (*) do if exist %%d/package.json (pushd %%d & echo --- npm booting: %%d ... & npm run boot & popd)) & popd
popd
pause
@GOTO END

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