improve gitignore and seafile-ignore

This commit is contained in:
Luk 2024-04-24 14:16:11 +08:00
parent e1683a2d0a
commit 2bc8b3c57e
3 changed files with 5 additions and 3 deletions

View File

@ -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 "***************************************"
echo "To find in which path? Enter [root path] or [leave blank] for the current path:"
echo "To find in which path? Enter [root path] or [leave blank] for the current path [[`pwd`]]:"
read -p ">>> " FIND_FOLDER
if [ ! "$FIND_FOLDER" ]
then

View File

@ -59,7 +59,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 [ -f "$repo/.gitignore.local.txt" ] # 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 [[$repo/.gitignore]] ----"
if [ -f "$IGNOREPATH" ]
@ -68,7 +68,7 @@ do
else
curl -sSL $IGNOREPATH | cat > $repo/.gitignore
fi
cat $repo/.gitignore.local.txt 2>/dev/null > $repo/.gitignore
cat $repo/.gitignore.local.txt 2>/dev/null >> $repo/.gitignore
echo ""
fi
done

View File

@ -17,6 +17,8 @@
*.gitomit.*
*.gitomit.*/
# 保留
!.gitignore
!.gitignore.*
!.gitkeep
# 通用