-
Notifications
You must be signed in to change notification settings - Fork 0
/
ignore
executable file
·38 lines (28 loc) · 955 Bytes
/
ignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/zsh
echo "# This .gitignore file is auto-generated. Do not edit!" > .gitignore
echo "# Edit Ignorefile instead." >> .gitignore
echo "" >> .gitignore
echo "" >> .gitignore
for target in "${(@f)$(yq '."gitignore.io"[]' Ignorefile)}"
do
curl -L -s "https://www.gitignore.io/api/$target" >> .gitignore || exit 2
echo "" >> .gitignore
echo "" >> .gitignore
echo "" >> .gitignore
done
for target in "${(@f)$(yq '.github[]' Ignorefile)}"
do
url="https://raw.githubusercontent.com/github/gitignore/main/$target.gitignore"
echo "# Downloaded from $url" >> .gitignore
echo "" >> .gitignore
curl -L -s $url >> .gitignore || exit 2
echo "" >> .gitignore
echo "" >> .gitignore
echo "" >> .gitignore
done
echo "### Project specific settings ###" >> .gitignore
echo "" >> .gitignore
for target in "${(@f)$(yq '.paths-ignore[]' Ignorefile)}"
do
echo $target >> .gitignore
done