u
This commit is contained in:
parent
304d2564fa
commit
85b40a6d90
13
nixhome/.gitignore → .gitignore
vendored
13
nixhome/.gitignore → .gitignore
vendored
@ -1,12 +1,18 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# 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 ###
|
||||||
|
|
||||||
# 自定义的后缀名,凡有 gitignore 后缀的都不进行同步
|
# Self defined extension to ignore all files/folders containing .gitignore
|
||||||
*.gitignore.*
|
*.gitignore.*
|
||||||
*.gitignore.*/
|
*.gitignore.*/
|
||||||
*.gitignore
|
*.gitignore
|
||||||
*.gitignore/
|
*.gitignore/
|
||||||
|
!.gitignore
|
||||||
|
|
||||||
# 通用
|
# 通用
|
||||||
.svn/
|
.svn/
|
||||||
@ -92,3 +98,6 @@ pages4loader.json5
|
|||||||
|
|
||||||
# 保留
|
# 保留
|
||||||
!.gitkeep
|
!.gitkeep
|
||||||
|
|
||||||
|
### .gitignore_local ###
|
||||||
|
|
@ -2,7 +2,7 @@ echo "***************************************"
|
|||||||
echo "find \$FOLDER -mindepth \$MINDEPTH -maxdepth \$MAXDEPTH -type d_f_l -name \"\$PATTERN\" | while read item; do echo \"\$item\"; done"
|
echo "find \$FOLDER -mindepth \$MINDEPTH -maxdepth \$MAXDEPTH -type d_f_l -name \"\$PATTERN\" | while read item; do echo \"\$item\"; done"
|
||||||
echo "***************************************"
|
echo "***************************************"
|
||||||
|
|
||||||
echo "To find in which path? Enter [start path] or [leave blank] for the current path:"
|
echo "To find in which path? Enter [root path] or [leave blank] for the current path:"
|
||||||
read -p ">>> " FIND_FOLDER
|
read -p ">>> " FIND_FOLDER
|
||||||
if [ ! "$FIND_FOLDER" ]
|
if [ ! "$FIND_FOLDER" ]
|
||||||
then
|
then
|
||||||
|
@ -47,7 +47,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
echo "Path to global gitignore file? (For example ~/.gitignore, leave blank for no change)"
|
echo "Path to global gitignore file? (For example ~/.gitignore_global, leave blank for no change)"
|
||||||
read -p ">>> " ExcludesFile
|
read -p ">>> " ExcludesFile
|
||||||
if [ $ExcludesFile ]
|
if [ $ExcludesFile ]
|
||||||
then
|
then
|
||||||
|
@ -20,7 +20,7 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]]
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path] or [leave blank] for default [[%CD%]] to start tree search for .gitignore files
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
@ -39,7 +39,7 @@ pushd %ROOTPATH%
|
|||||||
echo *** Starting from [[%CD%]] ***
|
echo *** Starting from [[%CD%]] ***
|
||||||
echo;
|
echo;
|
||||||
|
|
||||||
echo === Enter [path to .gitignore] or [leave blank] for default to [[%CD%]]
|
echo === Enter [path to global .gitignore] or [leave blank] for default [[%CD%]]
|
||||||
set /p IGNOREPATH=">>> "
|
set /p IGNOREPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%IGNOREPATH%" (
|
if "" == "%IGNOREPATH%" (
|
||||||
@ -55,10 +55,10 @@ if not exist "%IGNOREPATH%" (
|
|||||||
for /d /r %%r in (*) do (
|
for /d /r %%r in (*) do (
|
||||||
@REM @ if not "%%r" == ".vscode" (
|
@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 || (
|
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||||
if exist "%%r\.gitignore" (
|
if exist "%%r\.git" (
|
||||||
pushd "%%r"
|
pushd "%%r"
|
||||||
echo ---- updating .gitignore in [[%%r]] ----
|
echo ---- updating .gitignore in [[%%r]] ----
|
||||||
copy %IGNOREPATH%\.gitignore %%r\
|
cat %IGNOREPATH%\.gitignore %%r\.gitignore_local > %%r\.gitignore
|
||||||
echo;
|
echo;
|
||||||
popd
|
popd
|
||||||
)
|
)
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Search in [ROOTPATH], merge [IGNOREPATH/.gitignore_global] and [ROOTPATH/*/.gitignore_local] files to [seafile-ignore.txt]"
|
||||||
|
echo ""
|
||||||
|
|
||||||
if [ -d "$1" ]
|
if [ -d "$1" ]
|
||||||
then
|
then
|
||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo "=== Enter [root path] or [leave blank] for default [[`pwd`]] to start tree search for git repositories"
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
if [ "$ROOTPATH" ]
|
||||||
if [ ! "$ROOTPATH" ]
|
|
||||||
then
|
then
|
||||||
|
ROOTPATH=$(realpath $ROOTPATH)
|
||||||
|
else
|
||||||
ROOTPATH=`pwd`
|
ROOTPATH=`pwd`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ROOTPATH" ]
|
if [ ! -d "$ROOTPATH" ]
|
||||||
then
|
then
|
||||||
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
||||||
@ -21,13 +24,29 @@ then
|
|||||||
else
|
else
|
||||||
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== Enter [path to .gitignore]"
|
|
||||||
read -p ">>> " IGNOREPATH
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ ! -f "$IGNOREPATH/.gitignore" ]
|
|
||||||
|
echo "=== Enter [path to .gitignore_global] or [leave blank] for default [[`pwd`]]"
|
||||||
|
read -p ">>> " IGNOREPATH
|
||||||
|
if [ "$IGNOREPATH" ]
|
||||||
|
then
|
||||||
|
IGNOREPATH=$(realpath $IGNOREPATH)/.gitignore_global
|
||||||
|
else
|
||||||
|
IGNOREPATH=`pwd`/.gitignore_global
|
||||||
|
fi
|
||||||
|
if [ ! -f "$IGNOREPATH/.gitignore_global" ]
|
||||||
|
then
|
||||||
|
echo "××× Not found [[$IGNOREPATH]]. Exit now..."
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "√√√ IGNOREPATH = [[$IGNOREPATH]]"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
then
|
then
|
||||||
echo "××× Not found [[$IGNOREPATH/.gitignore]]. Exit now..."
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -40,7 +59,7 @@ do
|
|||||||
if [ -d "$repo/.git" ]
|
if [ -d "$repo/.git" ]
|
||||||
then
|
then
|
||||||
echo "---- updating .gitignore in [[$repo]] ----"
|
echo "---- updating .gitignore in [[$repo]] ----"
|
||||||
cp $IGNOREPATH/.gitignore $repo/
|
cat $IGNOREPATH $repo/.gitignore_local 2>/dev/null > $repo/.gitignore
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -20,7 +20,7 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]]
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path]> or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path]> or [leave blank] for default to [[%CD%]]
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
|
@ -5,15 +5,15 @@ then
|
|||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
echo "=== Enter [root path] or [leave blank] for default to [[`pwd`]]"
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
if [ "$ROOTPATH"]
|
||||||
if [ ! "$ROOTPATH" ]
|
|
||||||
then
|
then
|
||||||
|
ROOTPATH=`realpath $ROOTPATH`
|
||||||
|
else
|
||||||
ROOTPATH=`pwd`
|
ROOTPATH=`pwd`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ROOTPATH" ]
|
if [ ! -d "$ROOTPATH" ]
|
||||||
then
|
then
|
||||||
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
||||||
@ -21,6 +21,14 @@ then
|
|||||||
else
|
else
|
||||||
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
||||||
fi
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
pushd $ROOTPATH
|
pushd $ROOTPATH
|
||||||
echo "*** Starting from [[`pwd`]] ***"
|
echo "*** Starting from [[`pwd`]] ***"
|
||||||
|
@ -20,7 +20,7 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]]
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path] or [leave blank] for default to [[%CD%]]
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
|
@ -5,15 +5,15 @@ then
|
|||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
echo "=== Enter [root path] or [leave blank] for default to [[`pwd`]]"
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
if [ "$ROOTPATH"]
|
||||||
if [ ! "$ROOTPATH" ]
|
|
||||||
then
|
then
|
||||||
|
ROOTPATH=`realpath $ROOTPATH`
|
||||||
|
else
|
||||||
ROOTPATH=`pwd`
|
ROOTPATH=`pwd`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ROOTPATH" ]
|
if [ ! -d "$ROOTPATH" ]
|
||||||
then
|
then
|
||||||
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
||||||
@ -22,6 +22,13 @@ else
|
|||||||
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
pushd $ROOTPATH
|
pushd $ROOTPATH
|
||||||
echo "*** Starting from [[`pwd`]] ***"
|
echo "*** Starting from [[`pwd`]] ***"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -5,15 +5,15 @@ then
|
|||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
echo "=== Enter [root path] or [leave blank] for default to [[`pwd`]]"
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
if [ "$ROOTPATH"]
|
||||||
if [ ! "$ROOTPATH" ]
|
|
||||||
then
|
then
|
||||||
|
ROOTPATH=`realpath $ROOTPATH`
|
||||||
|
else
|
||||||
ROOTPATH=`pwd`
|
ROOTPATH=`pwd`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ROOTPATH" ]
|
if [ ! -d "$ROOTPATH" ]
|
||||||
then
|
then
|
||||||
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
||||||
@ -22,6 +22,13 @@ else
|
|||||||
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
pushd $ROOTPATH
|
pushd $ROOTPATH
|
||||||
echo "*** Starting from [[`pwd`]] ***"
|
echo "*** Starting from [[`pwd`]] ***"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -3,21 +3,35 @@
|
|||||||
echo "in [REPOROOT]/*/*/hooks/[pre-receive.d|post-receive.d|update.d]/gitea, path is hard-coded in full such as `/faronear/git/gitea/gitea hook --config=/faronear/git/gitea/custom/conf/app.ini`, you need to replace it if the path is changed."
|
echo "in [REPOROOT]/*/*/hooks/[pre-receive.d|post-receive.d|update.d]/gitea, path is hard-coded in full such as `/faronear/git/gitea/gitea hook --config=/faronear/git/gitea/custom/conf/app.ini`, you need to replace it if the path is changed."
|
||||||
echo "[20230305] noticed that gitea 1.18.5 default is `/usr/local/bin/gitea hook --config=/data/gitea/conf/app.ini`"
|
echo "[20230305] noticed that gitea 1.18.5 default is `/usr/local/bin/gitea hook --config=/data/gitea/conf/app.ini`"
|
||||||
|
|
||||||
echo "Enter [old hook path] or [leave blank] for default '/faronear/git/gitea/gitea':"
|
echo "=== Enter [old hook path string] or [leave blank] for default '/faronear/git/gitea/gitea':"
|
||||||
read -p ">>> " OLDPATH
|
read -p ">>> " OLDPATH
|
||||||
if [ ! "$OLDPATH"]
|
if [ ! "$OLDPATH"]
|
||||||
then
|
then
|
||||||
OLDPATH=/faronear/git/gitea/gitea
|
OLDPATH=/faronear/git/gitea/gitea
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Enter [new hook path] or [leave blank] for default '/usr/local/bin/gitea': "
|
echo "=== Enter [new hook path string] or [leave blank] for default '/usr/local/bin/gitea': "
|
||||||
read -p ">> " NEWPATH
|
read -p ">>> " NEWPATH
|
||||||
if [ ! "$NEWPATH" ]
|
if [ ! "$NEWPATH" ]
|
||||||
then
|
then
|
||||||
NEWPATH=/usr/local/bin/gitea
|
NEWPATH=/usr/local/bin/gitea
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Enter repository root path: >> " REPOROOT
|
echo "=== Enter [root path] of repositories, or [leave blank] for default [[]]`pwd`]] "
|
||||||
|
read -p ">>> " REPOROOT
|
||||||
|
if [ "$ROOTPATH"]
|
||||||
|
then
|
||||||
|
ROOTPATH=`realpath $ROOTPATH`
|
||||||
|
else
|
||||||
|
ROOTPATH=`pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# 用 : 来取代 /,以避免大量出现 \/
|
# 用 : 来取代 /,以避免大量出现 \/
|
||||||
# sed -i "s/\/home\/fon\//\/root\//g" `grep '/home/fon' -rl git.repo/*/*/hooks/*.d/gitea`
|
# sed -i "s/\/home\/fon\//\/root\//g" `grep '/home/fon' -rl git.repo/*/*/hooks/*.d/gitea`
|
||||||
|
@ -48,7 +48,7 @@ then
|
|||||||
|
|
||||||
pushd $HomePath
|
pushd $HomePath
|
||||||
|
|
||||||
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore_global"
|
||||||
echo
|
echo
|
||||||
echo "=== Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:"
|
echo "=== Copy or link scripts? [l] to link, [c] to copy, [g] to git import, [anything else] to omit:"
|
||||||
read -p ">>> " CopyOrLinkScripts
|
read -p ">>> " CopyOrLinkScripts
|
||||||
|
103
nixhome/.gitignore_global
Normal file
103
nixhome/.gitignore_global
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
# 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/
|
||||||
|
*.apk
|
||||||
|
*.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,6 +6,8 @@
|
|||||||
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
||||||
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
||||||
|
|
||||||
|
### seafile-ignore_global ###
|
||||||
|
|
||||||
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
||||||
*.sfignore
|
*.sfignore
|
||||||
*.sfignore.*
|
*.sfignore.*
|
||||||
@ -50,3 +52,6 @@ unpackage/
|
|||||||
|
|
||||||
Icon
|
Icon
|
||||||
OneDrive/Icon
|
OneDrive/Icon
|
||||||
|
|
||||||
|
### seafile-ignore_local ###
|
||||||
|
|
@ -20,7 +20,7 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]]
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path] or [leave blank] for default to [[%CD%]]
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
|
@ -5,7 +5,7 @@ then
|
|||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
echo "=== Enter [root path] or [leave blank] for default to [[`pwd`]]"
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
echo ""
|
||||||
if [ ! "$ROOTPATH" ]
|
if [ ! "$ROOTPATH" ]
|
||||||
|
@ -15,7 +15,7 @@ set ROOTPATH=
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path] or [leave blank] for default to [[%CD%]]
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
|
@ -20,7 +20,7 @@ echo *** Testing Path [[%ROOTPATH1%]] [[%ROOTPATH2%]] [[%ROOTPATH3%]]
|
|||||||
) else (
|
) else (
|
||||||
echo ××× none of the testing path is valid.
|
echo ××× none of the testing path is valid.
|
||||||
echo;
|
echo;
|
||||||
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
|
echo === Enter [root path] or [leave blank] for default [[%CD%]] to start tree search for seafile-ignore.txt files
|
||||||
set /p ROOTPATH=">>> "
|
set /p ROOTPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%ROOTPATH%" (
|
if "" == "%ROOTPATH%" (
|
||||||
@ -35,7 +35,7 @@ if not exist "%ROOTPATH%" (
|
|||||||
echo √√√ ROOTPATH = [[%ROOTPATH%]]
|
echo √√√ ROOTPATH = [[%ROOTPATH%]]
|
||||||
)
|
)
|
||||||
|
|
||||||
echo === Enter [path to seafile-ignore.txt] or leave [blank] for default to [[%CD%]]
|
echo === Enter [path to global seafile-ignore.txt] or [leave blank] for default [[%CD%]]
|
||||||
set /p IGNOREPATH=">>> "
|
set /p IGNOREPATH=">>> "
|
||||||
echo;
|
echo;
|
||||||
if "" == "%IGNOREPATH%" (
|
if "" == "%IGNOREPATH%" (
|
||||||
@ -55,9 +55,9 @@ echo;
|
|||||||
for /d /r %%r in (*) do (
|
for /d /r %%r in (*) do (
|
||||||
@REM @ if not "%%r" == ".vscode" (
|
@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 || (
|
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
|
||||||
if exist "%%r\.git" (
|
if exist "%%r\seafile-ignore.txt" (
|
||||||
echo ---- updating seafile-ignore.txt in [[%%r]] ----
|
echo ---- updating seafile-ignore.txt in [[%%r]] ----
|
||||||
copy %IGNOREPATH%\seafile-ignore.txt %%r\
|
cat %IGNOREPATH%\seafile-ignore.txt %%r\seafile-ignore_local.txt > %%r\seafile-ignore.txt
|
||||||
echo;
|
echo;
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Search in [ROOTPATH], Merge [IGNOREPATH/seafile-ignore_global] and [ROOTPATH/*/seafile-ignore_local] files to [seafile-ignore.txt]"
|
||||||
|
echo ""
|
||||||
|
|
||||||
if [ -d "$1" ]
|
if [ -d "$1" ]
|
||||||
then
|
then
|
||||||
ROOTPATH=$1
|
ROOTPATH=$1
|
||||||
else
|
else
|
||||||
echo ""
|
echo "=== Enter [root path] or [leave blank] for default [[`pwd`]] to start tree search for seafile-ignore.txt files"
|
||||||
echo "=== Enter [start path] or [leave blank] for default to [[`pwd`]]"
|
|
||||||
read -p ">>> " ROOTPATH
|
read -p ">>> " ROOTPATH
|
||||||
echo ""
|
if [ "$ROOTPATH" ]
|
||||||
if [ ! "$ROOTPATH" ]
|
|
||||||
then
|
then
|
||||||
|
ROOTPATH=$(realpath $ROOTPATH)
|
||||||
|
else
|
||||||
ROOTPATH=`pwd`
|
ROOTPATH=`pwd`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ROOTPATH" ]
|
if [ ! -d "$ROOTPATH" ]
|
||||||
then
|
then
|
||||||
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
echo "××× [[$ROOTPATH]] not exist! Exit now. ***"
|
||||||
@ -21,13 +24,28 @@ then
|
|||||||
else
|
else
|
||||||
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
echo "√√√ ROOTPATH = [[$ROOTPATH]]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== Enter [path to seafile-ignore.txt]"
|
|
||||||
read -p ">>> " IGNOREPATH
|
|
||||||
echo ""
|
echo ""
|
||||||
if [ ! -f "$IGNOREPATH/seafile-ignore.txt" ]
|
|
||||||
|
echo "=== Enter [path to seafile-ignore_global] or [leave blank] for default [[`pwd`]]"
|
||||||
|
read -p ">>> " IGNOREPATH
|
||||||
|
if [ "$IGNOREPATH" ]
|
||||||
|
then
|
||||||
|
IGNOREPATH=$(realpath $IGNOREPATH)/seafile-ignore_global
|
||||||
|
else
|
||||||
|
IGNOREPATH=`pwd`/seafile-ignore_global
|
||||||
|
fi
|
||||||
|
if [ ! -f "$IGNOREPATH" ]
|
||||||
|
then
|
||||||
|
echo "××× Not found [[$IGNOREPATH]]. Exit now..."
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "√√√ IGNOREPATH = [[$IGNOREPATH]]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Enter [y] to start updating, or [anything else] to quit"
|
||||||
|
read -p ">>> " YESNO
|
||||||
|
if [ "$YESNO" != 'y' ]
|
||||||
then
|
then
|
||||||
echo "××× Not found [[$IGNOREPATH/seafile-ignore.txt]]. Exit now..."
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -40,7 +58,7 @@ do
|
|||||||
if [ -f "$repo/seafile-ignore.txt" ]
|
if [ -f "$repo/seafile-ignore.txt" ]
|
||||||
then
|
then
|
||||||
echo "---- updating seafile-ignore.txt in [[$repo]] ----"
|
echo "---- updating seafile-ignore.txt in [[$repo]] ----"
|
||||||
cp $IGNOREPATH/seafile-ignore.txt $repo/
|
cat $IGNOREPATH $repo/seafile-ignore_local 2>/dev/null > $repo/seafile-ignore.txt
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user