diff --git a/acme-install.sh b/acme-install.sh index 8fd10c3..ea8a608 100644 --- a/acme-install.sh +++ b/acme-install.sh @@ -1,11 +1,10 @@ curl https://get.acme.sh | sh -s email=ssl@faronear.org ## 或者: -# git clone https://github.com/acmesh-official/acme.sh.git -# cd ./acme.sh +# git clone https://github.com/acmesh-official/acme.sh.git .acme.sh +# cd .acme.sh # ./acme.sh --install -m my@example.com pushd /faronear/sysconfig -# 取消被默认添加到 .bashrc 的设置 +# 取消被默认添加到 .bashrc 的设置,因为 already integrated in .bashrc git reset . && git checkout . -# echo '. "$HOME/.acme.sh/acme.sh.env"' >> ~/.bashrc_custom ## already integrated in .bashrc popd diff --git a/acme-uninstall.sh b/acme-uninstall.sh new file mode 100644 index 0000000..4a3aec4 --- /dev/null +++ b/acme-uninstall.sh @@ -0,0 +1,3 @@ +acme.sh --uninstall + +rm -r ~/.acme.sh diff --git a/git-ignore-find2merge.bat b/git-ignore-find2merge.bat index 9b5bdb0..781a70d 100644 --- a/git-ignore-find2merge.bat +++ b/git-ignore-find2merge.bat @@ -25,6 +25,8 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]] echo; if "" == "%ROOTPATH%" ( set ROOTPATH=%CD% + ) else ( + for %P in (%ROOTPATH%) do set "ROOTPATH=%~dpnxP" ) ) ) @@ -35,15 +37,13 @@ if not exist "%ROOTPATH%" ( echo √√√ ROOTPATH = [[%ROOTPATH%]] ) -pushd %ROOTPATH% -echo *** Starting from [[%CD%]] *** -echo; - -echo === Enter [path to global .gitignore] or [leave blank] for default [[%CD%]] +echo === Enter [path to .gitignore_global] or [leave blank] for default [[%CD%]] set /p IGNOREPATH=">>> " echo; if "" == "%IGNOREPATH%" ( - set IGNOREPATH=%CD% + set IGNOREPATH=%CD%/.gitignore_global +) else ( + for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore_global" ) if not exist "%IGNOREPATH%" ( echo ××× [[%IGNOREPATH%]] not exist! Exit now. *** @@ -52,6 +52,10 @@ if not exist "%IGNOREPATH%" ( echo √√√ IGNOREPATH = [[%IGNOREPATH%]] ) +pushd %ROOTPATH% +echo *** Starting from [[%CD%]] *** +echo; + for /d /r %%r in (*) do ( @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 || ( diff --git a/git-ignore-find2merge.sh b/git-ignore-find2merge.sh index 4e492c5..c54d9f4 100644 --- a/git-ignore-find2merge.sh +++ b/git-ignore-find2merge.sh @@ -56,7 +56,7 @@ echo "" find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -E -v 'node_modules|uni_modules|\.deploy_git|\.git|.svn|\.vscode|\.wrangler|unpackage|_webroot|_logstore|_datasotre|_archive|_filestore|_ssl' | while read repo do - if [ -d "$repo/.gitignore" ] # some git repo need to keep privacy, therefore judge from .gitignore, not from .git + if [ -f "$repo/.gitignore" ] # some git repo need to keep privacy, therefore judge from .gitignore, not from .git then echo "---- updating .gitignore in [[$repo]] ----" cat $IGNOREPATH $repo/.gitignore_local 2>/dev/null > $repo/.gitignore diff --git a/npm-boot-tree.sh b/npm-boot-tree.sh index 5ea61c9..687f188 100755 --- a/npm-boot-tree.sh +++ b/npm-boot-tree.sh @@ -7,13 +7,11 @@ else echo "" echo "=== Enter [root path] or [leave blank] for default to [[`pwd`]]" read -p ">>> " ROOTPATH - echo "" if [ ! "$ROOTPATH" ] then ROOTPATH=`pwd` fi fi - if [ ! -d "$ROOTPATH" ] then echo "××× [[$ROOTPATH]] not exist! Exit now. ***" @@ -21,6 +19,7 @@ then else echo "√√√ ROOTPATH = [[$ROOTPATH]]" fi +echo "" pushd $ROOTPATH echo "*** Starting from [[`pwd`]] ***" diff --git a/seafile-ignore-find2merge.bat b/seafile-ignore-find2merge.bat index 0807ad2..433adb9 100644 --- a/seafile-ignore-find2merge.bat +++ b/seafile-ignore-find2merge.bat @@ -25,6 +25,8 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]] echo; if "" == "%ROOTPATH%" ( set ROOTPATH=%CD% + ) else ( + for %P in (%ROOTPATH%) do set "ROOTPATH=%~dpnxP" ) ) ) @@ -35,11 +37,13 @@ if not exist "%ROOTPATH%" ( echo √√√ ROOTPATH = [[%ROOTPATH%]] ) -echo === Enter [path to global seafile-ignore.txt] or [leave blank] for default [[%CD%]] +echo === Enter [path to seafile-ignore_global] or [leave blank] for default [[%CD%]] set /p IGNOREPATH=">>> " echo; if "" == "%IGNOREPATH%" ( - set IGNOREPATH=%CD% + set IGNOREPATH=%CD%/seafile-ignore_global +) else ( + for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/seafile-ignore_global" ) if not exist "%IGNOREPATH%" ( echo ××× [[%IGNOREPATH%]] not exist! Exit now. *** @@ -57,7 +61,7 @@ for /d /r %%r in (*) do ( echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || ( if exist "%%r\seafile-ignore.txt" ( echo ---- updating seafile-ignore.txt in [[%%r]] ---- - cat %IGNOREPATH%\seafile-ignore.txt %%r\seafile-ignore_local.txt > %%r\seafile-ignore.txt + cat %IGNOREPATH% %%r\seafile-ignore_local > %%r\seafile-ignore.txt echo; ) )