git-pull-all 和 npm-boot-all 默认用 ../.. 做根目录

This commit is contained in:
陆柯 2021-07-02 13:03:02 +08:00
parent 7d38379698
commit ad892e7b24
6 changed files with 24 additions and 17 deletions

View File

@ -34,7 +34,7 @@ fi
echo "<<< Configure home" echo "<<< Configure home"
if [ ! -f "~/.bashrc.backup" ] if [ ! -f "~/.bashrc.backup" ]
then then
. /faronear/lib/sysconfig/config-home.sh /faronear/lib/sysconfig . /faronear/lib/sysconfig/config-home.sh /faronear/lib/sysconfig/home
fi fi
echo "<<< Change root password" echo "<<< Change root password"

View File

@ -1,9 +1,11 @@
@echo off @echo off
@ IF "%1" == "" echo Using current folder as root folder @ IF "%1" == "" (set BASEDIR=..\..) else (set BASEDIR=%1)
echo [ Goto %BASEDIR% as base directory ]
pushd %1 pushd %BASEDIR%
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 echo [ %CD% ]
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 popd
pause pause
@GOTO END @GOTO END

View File

@ -4,14 +4,15 @@ if [ $1 ]
then then
FONPATH=$1 FONPATH=$1
else else
read -p "Enter path to git pull (leave blank for default ./) >> " FONPATH read -p "Enter path to git pull (leave blank for default ../..) >> " FONPATH
if [ ! $FONPATH ] if [ ! $FONPATH ]
then then
echo Use default path: ./ FONPATH=../..
FONPATH=./
fi fi
fi fi
echo [ Goto $FONPATH as base directory ]
pushd $FONPATH pushd $FONPATH
for org in `ls .` for org in `ls .`
do do

View File

@ -2,7 +2,7 @@
# seafile 7/8 必须配 python3 # seafile 7/8 必须配 python3
sudo apt-get update sudo apt-get update
sudo apt-get install python3 python3-setuptools python3-pip python3-ldap -y sudo apt-get install python3 python3-setuptools python3-pip python3-ldap sqlite3 -y
sudo pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 psd-tools django-pylibmc django-simple-captcha sudo pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 psd-tools django-pylibmc django-simple-captcha
pushd /faronear pushd /faronear
@ -10,11 +10,12 @@ sudo mkdir seafile
cd seafile cd seafile
sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.5_x86-64.tar.gz sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.5_x86-64.tar.gz
sudo tar -xzf seafile-server_* sudo tar -xzf seafile-server_*
cd seafile-server_* cd seafile-server-*
sudo ./setup-seafile.sh sudo ./setup-seafile.sh
sed -i "s/127\.0\.0\.1/0.0.0.0/g" ../conf/gunicorn.conf # don't know why but it must be changed to 0.0.0.0 so that seahub.sh doesn't fail. But sometimes 127.0.0.1 also ok on debian 10 of tencent cloud.
./seafile.sh start sudo sed -i "s/127\.0\.0\.1/0.0.0.0/g" ../conf/gunicorn.conf.py
./seahub.sh sudo ./seafile.sh start
sudo ./seahub.sh start
popd popd

View File

@ -1,8 +1,10 @@
@echo off @echo off
@ IF "%1" == "" echo Using current folder as root folder @ IF "%1" == "" (set BASEDIR=..\..) else (set BASEDIR=%1)
echo [ Goto %BASEDIR% as base directory ]
pushd %1 pushd %BASEDIR%
echo [ %CD% ]
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 popd
pause pause

View File

@ -4,14 +4,15 @@ if [ $1 ]
then then
FONPATH=$1 FONPATH=$1
else else
read -p "Enter path to npm boot (leave blank for default ./) >> " FONPATH read -p "Enter path to npm boot (leave blank for default ../..) >> " FONPATH
if [ ! $FONPATH ] if [ ! $FONPATH ]
then then
echo Use default path: ./ FONPATH=../..
FONPATH=./
fi fi
fi fi
echo [ Goto %FONPATH as base directory ]
pushd $FONPATH pushd $FONPATH
for org in `ls .` for org in `ls .`
do do