u
This commit is contained in:
parent
f8f09294c1
commit
20aae37be5
7
debian-config.Dockerfile
Normal file
7
debian-config.Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM debian:11.5
|
||||
LABEL org.opencontainers.image.authors="luk"
|
||||
|
||||
RUN apt update && apt install curl -y
|
||||
RUN curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-config.sh > ~/debian-config.sh && echo -e "l\n\n\n\n\n" | bash ~/debian-config.sh
|
||||
|
||||
CMD bash
|
@ -2,7 +2,7 @@
|
||||
|
||||
echo "Usage: this.sh [NewUser]"
|
||||
echo "Example: this.sh alice"
|
||||
echo "curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-config.sh > ~/debian-config.sh && sudo bash ~/debian-config.sh"
|
||||
echo "curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-config.sh > ~/debian-config.sh && bash ~/debian-config.sh"
|
||||
|
||||
if [ "$1" ]
|
||||
then
|
||||
@ -95,8 +95,12 @@ then
|
||||
fi
|
||||
echo
|
||||
|
||||
echo "=== Add a new user [$NewUser]"
|
||||
source /faronear/fon/sysconfig/debian-add-user.sh $NewUser
|
||||
echo "=== Add a new user [$NewUser]? <y> for yes, <anything else> for no change:"
|
||||
read -p ">>> " AddNewUser
|
||||
if [ "$AddNewUser" == 'y' ]
|
||||
then
|
||||
source /faronear/fon/sysconfig/debian-add-user.sh $NewUser
|
||||
fi
|
||||
echo
|
||||
|
||||
echo "=== Enable xfce autologin [/etc/lightdm/lightdm.conf]: <y> for autologin as [$NewUser] or <anything else> for no change:"
|
||||
|
@ -34,19 +34,21 @@ echo;
|
||||
@REM 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 %%o in (*) do (
|
||||
echo ======== entering [%FONPATH%\%%o] ========
|
||||
echo;
|
||||
pushd %%o
|
||||
for /d %%g in (*) do (
|
||||
if exist "%%g\.git" (
|
||||
pushd %%g
|
||||
echo ---- git pulling [%FONPATH%\%%o\%%g] ----
|
||||
git pull --all
|
||||
echo;
|
||||
popd
|
||||
@ if not "%%o" == ".vscode" (
|
||||
echo ======== entering [%FONPATH%\%%o] ========
|
||||
echo;
|
||||
pushd %%o
|
||||
for /d %%g in (*) do (
|
||||
if exist "%%g\.git" (
|
||||
pushd %%g
|
||||
echo ---- git pulling [%FONPATH%\%%o\%%g] ----
|
||||
git pull --all
|
||||
echo;
|
||||
popd
|
||||
)
|
||||
)
|
||||
popd
|
||||
)
|
||||
popd
|
||||
)
|
||||
|
||||
popd
|
||||
|
@ -32,7 +32,8 @@ echo *** Starting from [%CD%] ***
|
||||
echo;
|
||||
|
||||
for /d /r %%r in (*) do (
|
||||
echo "%%r" | findstr "node_modules" >NUL || (
|
||||
@REM @ if not "%%r" == ".vscode" (
|
||||
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||
if exist "%%r\.git" (
|
||||
pushd "%%r"
|
||||
echo ---- git pulling [%%r] ----
|
||||
|
@ -36,7 +36,7 @@ pushd $FONPATH
|
||||
echo "*** Starting from [`pwd`] ***"
|
||||
echo ""
|
||||
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -E -v 'node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl' | while read repo
|
||||
do
|
||||
if [ -d "$repo/.git" ]
|
||||
then
|
||||
|
@ -41,19 +41,21 @@ echo;
|
||||
@REM 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 %%o in (*) do (
|
||||
echo ======== entering [%FONPATH%\%%o] ========
|
||||
echo;
|
||||
pushd "%%o"
|
||||
for /d %%g in (*) do (
|
||||
if exist %%g\.git (
|
||||
pushd "%%g"
|
||||
echo ---- git commit and push [%FONPATH%\%%o\%%g] ----
|
||||
git add . && git commit -m "%COMMIT_MESSAGE%" && git push
|
||||
echo;
|
||||
popd
|
||||
@ if not "%%o" == ".vscode" (
|
||||
echo ======== entering [%FONPATH%\%%o] ========
|
||||
echo;
|
||||
pushd "%%o"
|
||||
for /d %%g in (*) do (
|
||||
if exist %%g\.git (
|
||||
pushd "%%g"
|
||||
echo ---- git commit and push [%FONPATH%\%%o\%%g] ----
|
||||
git add . && git commit -m "%COMMIT_MESSAGE%" && git push
|
||||
echo;
|
||||
popd
|
||||
)
|
||||
)
|
||||
popd
|
||||
)
|
||||
popd
|
||||
)
|
||||
|
||||
popd
|
||||
|
@ -39,7 +39,8 @@ set /p COMMIT_MESSAGE=">>> "
|
||||
echo;
|
||||
|
||||
for /d /r %%r in (*) do (
|
||||
echo "%%r" | findstr "node_modules" >NUL || (
|
||||
@REM @ if not "%%r" == ".vscode" (
|
||||
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||
if exist "%%r\.git" (
|
||||
pushd "%%r"
|
||||
echo ---- git commit and push [%%r] ----
|
||||
|
@ -44,7 +44,7 @@ then
|
||||
fi
|
||||
echo ""
|
||||
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -E -v 'node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl' | while read repo
|
||||
do
|
||||
if [ -d "$repo/.git" ]
|
||||
then
|
||||
|
@ -32,7 +32,8 @@ echo *** Starting from [%CD%] ***
|
||||
echo;
|
||||
|
||||
for /d /r %%r in (*) do (
|
||||
echo "%%r" | findstr "node_modules" >NUL || (
|
||||
@REM @ if not "%%r" == "node_modules" (
|
||||
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||
if exist "%%r\package.json" (
|
||||
findstr "\"boot\"" "%%r\package.json" >NUL && (
|
||||
pushd %%r
|
||||
|
@ -36,7 +36,7 @@ pushd $FONPATH
|
||||
echo "*** Starting from [`pwd`] ***"
|
||||
echo ""
|
||||
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
|
||||
find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -E -v 'node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl' | while read repo
|
||||
do
|
||||
if ( [ -f "$repo/package.json" ] && grep -q '"boot"' "$repo/package.json" )
|
||||
then
|
||||
|
@ -34,7 +34,7 @@ echo;
|
||||
@REM 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 %%o in (*) do (
|
||||
@REM windows的链接文件会造成路径错误,从而终止该循环,从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。
|
||||
@REM windows的链接文件会造成路径错误,从而终止该循环,从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。
|
||||
@ if not "%%o" == ".vscode" (
|
||||
echo ======== entering [%FONPATH%\%%o] ========
|
||||
echo;
|
||||
|
@ -32,7 +32,8 @@ echo *** Starting from [%CD%] ***
|
||||
echo;
|
||||
|
||||
for /d /r %%r in (*) do (
|
||||
if not "%%r" == "node_modules" (
|
||||
@REM if not "%%r" == "node_modules" (
|
||||
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||
if exist "%%r\node_modules" (
|
||||
pushd "%%r"
|
||||
echo ---- Deleting [%FONPATH%\%%r] ----
|
||||
|
Loading…
Reference in New Issue
Block a user