rename *ignore_global/local to *ignore.global/local.txt
				
					
				
			This commit is contained in:
		
							parent
							
								
									7d3cf98072
								
							
						
					
					
						commit
						30e0c2551a
					
				
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -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 ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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 ###
 | 
			
		||||
 | 
			
		||||
@ -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 ###
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
    )
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user