From c5e7a97424d6f0d45ef2d39dbbdebc85196a7a15 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 17 May 2023 11:01:20 +0200 Subject: [PATCH] Update git ignore script The script was trying to be too smart and now no longer looks for actual files but instead just adds everything to the gitignore file directly. Use shell globbing for automatic file listing instead. --- bin/git-ignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/git-ignore b/bin/git-ignore index 7cac42b..fe4320d 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -4,5 +4,7 @@ if [ -z "$@" ] then $(git config --get core.editor) $(git rev-parse --show-toplevel)/.git/info/exclude else - ls -d "$@" >> "$(git rev-parse --show-toplevel)/.git/info/exclude" + for file in "$@" + do echo "$file" >> "$(git rev-parse --show-toplevel)/.git/info/exclude" + done fi