mirror of
https://gitlab.com/TECHNOFAB/soonix.git
synced 2025-12-12 06:10:06 +01:00
fix(gitignore): correctly grep for file with / prefix
This commit is contained in:
parent
ed75ed6695
commit
1433186d97
2 changed files with 2 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -2,5 +2,5 @@
|
||||||
result
|
result
|
||||||
|
|
||||||
# soonix
|
# soonix
|
||||||
test.yaml
|
/test.yaml
|
||||||
# end soonix
|
# end soonix
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ in {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if file is already in gitignore
|
# Check if file is already in gitignore
|
||||||
if ! grep -Fxq "$file" "$gitignore"; then
|
if ! grep -Fxq "/$file" "$gitignore"; then
|
||||||
# Add sentinel comments if not present
|
# Add sentinel comments if not present
|
||||||
if ! grep -q "# soonix" "$gitignore"; then
|
if ! grep -q "# soonix" "$gitignore"; then
|
||||||
echo "" >> "$gitignore"
|
echo "" >> "$gitignore"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue