diff --git a/.gitignore b/.gitignore index b316cfd..81fa68f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ # https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples # https://gitignore.io -### .gitignore_global ### +### .gitignore.global.txt ### # Self defined extension to ignore all files/folders containing .gitignore *.gitignore.* @@ -99,5 +99,5 @@ pages4loader.json5 # 保留 !.gitkeep -### .gitignore_local ### +### .gitignore.local.txt ### diff --git a/find-and-run-recursively.sh b/find-and-run-recursively.sh index 4122b46..9040094 100644 --- a/find-and-run-recursively.sh +++ b/find-and-run-recursively.sh @@ -20,9 +20,9 @@ then MAXDEPTH_CLAUSE="-maxdepth $MAXDEPTH" fi -echo "To find file or directory? [f] for file, [d] for directory, [l] for link, [leave blank] for all:" +echo "To find file or directory? [f] for file, [d] for directory, [l] for link, [anything else] for all:" read -p ">>> " FIND_TYPE -if [ "$FIND_TYPE" ] +if [ "$FIND_TYPE" = 'f' ] || [ "$FIND_TYPE" = 'd' ] || [ "$FIND_TYPE" = 'l' ] then FIND_TYPE_CLAUSE="-type $FIND_TYPE" fi diff --git a/git-config.sh b/git-config.sh index 81afa32..d98261d 100755 --- a/git-config.sh +++ b/git-config.sh @@ -47,7 +47,7 @@ then fi echo "---------------------------------------------" -echo "Path to global gitignore file? (For example ~/.gitignore_global, leave blank for no change)" +echo "Path to global gitignore file? (For example ~/.gitignore.global.txt, leave blank for no change)" read -p ">>> " ExcludesFile if [ $ExcludesFile ] then diff --git a/git-ignore-find2merge.bat b/git-ignore-find2merge.bat index 285a6a6..f796c40 100644 --- a/git-ignore-find2merge.bat +++ b/git-ignore-find2merge.bat @@ -23,13 +23,13 @@ if not exist "%ROOTPATH%" ( echo √√√ ROOTPATH = [[%ROOTPATH%]] ) -echo === Enter [path to .gitignore_global] or [leave blank] for default [[%CD%]] +echo === Enter [path to .gitignore.global.txt] or [leave blank] for default [[%CD%]] set /p IGNOREPATH=">>> " echo; if "" == "%IGNOREPATH%" ( - set IGNOREPATH=%CD%/.gitignore_global + set IGNOREPATH=%CD%/.gitignore.global.txt ) else ( - for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore_global" + for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/.gitignore.global.txt" ) if not exist "%IGNOREPATH%" ( echo ××× [[%IGNOREPATH%]] not exist! Exit now. *** @@ -48,7 +48,7 @@ for /d /r %%r in (*) do ( if exist "%%r\.git" ( pushd "%%r" echo ---- updating .gitignore in [[%%r]] ---- - cat %IGNOREPATH%\.gitignore %%r\.gitignore_local > %%r\.gitignore + cat %IGNOREPATH%\.gitignore %%r\.gitignore.local.txt > %%r\.gitignore echo; popd ) diff --git a/git-ignore-find2merge.sh b/git-ignore-find2merge.sh index c54d9f4..0f18fe5 100644 --- a/git-ignore-find2merge.sh +++ b/git-ignore-find2merge.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "" -echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore_global] and [ROOTPATH/*/.gitignore_local] files to [seafile-ignore.txt]" +echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore.global.txt] and [ROOTPATH/*/.gitignore.local.txt] files to [seafile-ignore.txt]" echo "" if [ -d "$1" ] @@ -26,13 +26,13 @@ else fi echo "" -echo "=== Enter [path to .gitignore_global] or [leave blank] for default [[`pwd`]]" +echo "=== Enter [path to .gitignore.global.txt] or [leave blank] for default [[`pwd`]]" read -p ">>> " IGNOREPATH if [ "$IGNOREPATH" ] then - IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore_global + IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore.global.txt else - IGNOREPATH=`pwd`/.gitignore_global + IGNOREPATH=`pwd`/.gitignore.global.txt fi if [ ! -f "$IGNOREPATH" ] then @@ -59,7 +59,7 @@ do 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 + cat $IGNOREPATH $repo/.gitignore.local.txt 2>/dev/null > $repo/.gitignore echo "" fi done diff --git a/git-ignore-merge-here.sh b/git-ignore-merge-here.sh index 93b0e16..c3dd2d2 100644 --- a/git-ignore-merge-here.sh +++ b/git-ignore-merge-here.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo === Merge remote [.gitignore_global] and local [.gitignore_local] to [.gitignore] === -curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.gitignore_global > .gitignore -if [ -f .gitignore_local ]; then cat .gitignore_local >> .gitignore; fi; +echo === Merge remote [.gitignore.global.txt] and local [.gitignore.local.txt] to [.gitignore] === +curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.gitignore.global.txt > .gitignore +if [ -f .gitignore.local.txt ]; then cat .gitignore.local.txt >> .gitignore; fi; echo diff --git a/nixhome-config.sh b/nixhome-config.sh index cd022ca..6751cbf 100755 --- a/nixhome-config.sh +++ b/nixhome-config.sh @@ -48,7 +48,7 @@ then pushd $HomePath - homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore_global" + homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore.global.txt" echo echo "=== Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:" read -p ">>> " CopyOrLinkScripts diff --git a/nixhome/.gitignore_global b/nixhome/.gitignore_global deleted file mode 100644 index 09cdbe8..0000000 --- a/nixhome/.gitignore_global +++ /dev/null @@ -1,105 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -# how to include another gitignore? -# https://stackoverflow.com/questions/7005142/can-i-include-other-gitignore-file-in-a-gitignore-file-like-include-in-c-li -# https://github.com/github/gitignore -# https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples -# https://gitignore.io - -### .gitignore_global ### - -# Self defined extension to ignore all files/folders containing .gitignore -*.gitignore.* -*.gitignore.*/ -*.gitignore -*.gitignore/ -!.gitignore - -# 通用 -.svn/ -.deploy_git/ -.idea/ -.sass-cache/ -.wrangler -/test/unit/coverage/ -/test/e2e/reports/ -node_modules/ -*.aab -*.apk -*.ipa -*.min.js -*.min.css -*.min.html -*.iml -*.njsproj -*.ntvs* -*.sw* -*.sln -*.suo -.gitattributes -.umi -.umi-production -npm-debug.log* -yarn-debug.log* -yarn-error.log* -yarn.lock -selenium-debug.log -Thumbs.db -thumbs.db -_desktop.ini - -# vue-cli 项目 -/dist/ - -# 来自 vue-cli 创建项目的 .gitignore -.project - -# hexo -/public/ - -# Hardhat -/artifacts/ -/cache/ - -# seafile 临时文件 -._* - -.$* - -# office 暂存文件 -~$* - -# 用户shell配置脚本 -.bashrc_custom - -# 苹果系统临时文件 -.DS_Store - -# 安卓缓存文件夹 -.thumbnails - -# local env files -.env.local -.env.*.local - -# hexo -/db.json - -# wo -# 服务端 -/_archive/* -/_datastore/* -/_filestore/* -/_logstore/* -/_webroot/* -/_ssl/* -# uniapp 客户端 -/unpackage/* -!/unpackage/res/ -package-lock.json -pages4loader.json5 - -# 保留 -!.gitkeep - -### .gitignore_local ### - diff --git a/nixhome/seafile-ignore_global b/nixhome/seafile-ignore.global.txt similarity index 90% rename from nixhome/seafile-ignore_global rename to nixhome/seafile-ignore.global.txt index 8328961..7c60b3e 100644 --- a/nixhome/seafile-ignore_global +++ b/nixhome/seafile-ignore.global.txt @@ -6,7 +6,7 @@ # 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。 # seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。 -### seafile-ignore_global ### +### seafile-ignore.global.txt ### # 自定义的后缀名,凡有 sfignore 后缀的都不进行同步 *.sfignore @@ -53,5 +53,12 @@ unpackage/ Icon OneDrive/Icon -### seafile-ignore_local ### +# wrangler project + +.dev.vars* +*/.dev.vars* +.wrangler/ +*/.wrangler/ + +### seafile-ignore.local.txt ### diff --git a/seafile-ignore-find2merge.bat b/seafile-ignore-find2merge.bat index 7cbf644..bb3d7d9 100644 --- a/seafile-ignore-find2merge.bat +++ b/seafile-ignore-find2merge.bat @@ -23,13 +23,13 @@ if not exist "%ROOTPATH%" ( echo √√√ ROOTPATH = [[%ROOTPATH%]] ) -echo === Enter [path to seafile-ignore_global] or [leave blank] for default [[%CD%]] +echo === Enter [path to seafile-ignore.global.txt] or [leave blank] for default [[%CD%]] set /p IGNOREPATH=">>> " echo; if "" == "%IGNOREPATH%" ( - set IGNOREPATH=%CD%/seafile-ignore_global + set IGNOREPATH=%CD%/seafile-ignore.global.txt ) else ( - for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/seafile-ignore_global" + for %P in (%IGNOREPATH%) do set "IGNOREPATH=%~dpnxP/seafile-ignore.global.txt" ) if not exist "%IGNOREPATH%" ( echo ××× [[%IGNOREPATH%]] not exist! Exit now. *** @@ -47,7 +47,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% %%r\seafile-ignore_local > %%r\seafile-ignore.txt + cat %IGNOREPATH% %%r\seafile-ignore.local.txt > %%r\seafile-ignore.txt echo; ) ) diff --git a/seafile-ignore-find2merge.sh b/seafile-ignore-find2merge.sh index 3ef75d6..8281211 100644 --- a/seafile-ignore-find2merge.sh +++ b/seafile-ignore-find2merge.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "" -echo "Search in [ROOTPATH], Merge [IGNOREPATH/seafile-ignore_global] and [ROOTPATH/*/seafile-ignore_local] files to [seafile-ignore.txt]" +echo "Search in [ROOTPATH], Merge [IGNOREPATH/seafile-ignore.global.txt] and [ROOTPATH/*/seafile-ignore.local.txt] files to [seafile-ignore.txt]" echo "" if [ -d "$1" ] @@ -26,13 +26,13 @@ else fi echo "" -echo "=== Enter [path to seafile-ignore_global] or [leave blank] for default [[`pwd`]]" +echo "=== Enter [path to seafile-ignore.global.txt] or [leave blank] for default [[`pwd`]]" read -p ">>> " IGNOREPATH if [ "$IGNOREPATH" ] then - IGNOREPATH=$(realpath $IGNOREPATH)/seafile-ignore_global + IGNOREPATH=$(realpath $IGNOREPATH)/seafile-ignore.global.txt else - IGNOREPATH=`pwd`/seafile-ignore_global + IGNOREPATH=`pwd`/seafile-ignore.global.txt fi if [ ! -f "$IGNOREPATH" ] then @@ -59,7 +59,7 @@ do if [ -f "$repo/seafile-ignore.txt" ] then echo "---- updating seafile-ignore.txt in [[$repo]] ----" - cat $IGNOREPATH $repo/seafile-ignore_local 2>/dev/null > $repo/seafile-ignore.txt + cat $IGNOREPATH $repo/seafile-ignore.local.txt 2>/dev/null > $repo/seafile-ignore.txt echo "" fi done diff --git a/seafile-ignore-merge-here.sh b/seafile-ignore-merge-here.sh index e26d61f..338d2c6 100644 --- a/seafile-ignore-merge-here.sh +++ b/seafile-ignore-merge-here.sh @@ -1,6 +1,6 @@ #!/bin/bash -echo === Merge remote [seafile-ignore_global] and local [seafile-ignore_local] to [seafile-ignore.txt] === -curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/seafile-ignore_global > seafile-ignore.txt -if [ -f seafile-ignore_local ]; then cat seafile-ignore_local >> seafile-ignore.txt; fi +echo === Merge remote [seafile-ignore.global.txt] and local [seafile-ignore.local.txt] to [seafile-ignore.txt] === +curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/seafile-ignore.global.txt > seafile-ignore.txt +if [ -f seafile-ignore.local.txt ]; then cat seafile-ignore.local.txt >> seafile-ignore.txt; fi echo