summaryrefslogtreecommitdiff
path: root/init.d/50git-ignore
blob: 71469abe35aef5606be66f12b2e22aff01ebd013 (plain)
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
#!/bin/sh
set -e
if [ ! -e .gitignore ]; then
	if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then
		cat >.gitignore <<EOF
# new and old versions of conffiles, stored by dpkg
*.dpkg-*
EOF
	fi
	if [ "$LOWLEVEL_PACKAGE_MANAGER" = "pacman-g2" ]; then
		cat >.gitignore <<EOF
# new and old versions of conffiles, stored by pacman
*.pacnew
*.pacorig
*.pacsave
EOF
	fi
	cat >>.gitignore <<EOF

*~

# mount(8) records system state here, no need to keep these in git
blkid.tab
blkid.tab.old

# some other files in /etc that typically do not need to be tracked
ld.so.cache
mtab
.pwd.lock
network/run
adjtime

EOF
fi