Skip to content
Snippets Groups Projects
Commit 980cf95c authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Improve seeg-gitignore to work around git's issues; still not happy

parent 31149fc2
No related branches found
No related tags found
No related merge requests found
...@@ -214,12 +214,13 @@ elif [ "$VCSH_COMMAND" = 'seed-gitignore' ]; then ...@@ -214,12 +214,13 @@ elif [ "$VCSH_COMMAND" = 'seed-gitignore' ]; then
[ "$file" = "$new" ] && break [ "$file" = "$new" ] && break
file="$new" file="$new"
done; done;
done | sort -u | sed 's/^/!/') done | sort -u)
tempfile=$(mktemp) || tempfile=$(mktemp) ||
(echo "$SELF: fatal: could not create tempfile" && exit 1) (echo "$SELF: fatal: could not create tempfile" && exit 1)
echo '*' > "$tempfile" echo '*' > "$tempfile"
for gitignore in $gitignores; do for gitignore in $gitignores; do
echo "$gitignore" >> "$tempfile" echo "$gitignore" | sed 's/^/!/' >> "$tempfile"
[ -d "$gitignore" ] && echo "$gitignore/*" | sed 's/^/!/'>> "$tempfile"
done done
diff -N "$tempfile" "$HOME/.gitignore.d/$VCSH_REPO_NAME" > /dev/null && diff -N "$tempfile" "$HOME/.gitignore.d/$VCSH_REPO_NAME" > /dev/null &&
rm -f "$tempfile" && rm -f "$tempfile" &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment