summaryrefslogtreecommitdiff
path: root/presentations/taler-mdb-36c3/.template/mk_gitignore.sh
blob: 46e41dd34e89ec174b1a3bc48c27df262d61f6be (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# generate variables.txt
# Author: Andreas HABEGGER <andreas.habegger>
# Date  : 2017
# Based on an idea by Albert Reiner.

_FILE_PERM=644

OUTFILE=".gitignore"         # Name of the file to generate.

OUTFILE="${_DESTINATION_DIR}/${OUTFILE}"

# -----------------------------------------------------------
# 'Here document containing the body of the generated script.
(
cat <<'EOF'
# Ignore Linux temp files
*~

# Ignore Mac specific files
.DS_Store

# Ignore Windows temp files
*.log
*.temp
*.tmp

# Ignore NFS lock ressources
.nfs*

# Ignore Snapshots directories
.snapshot

#ignore all autobuild directories
_*

# ignore Emacs temp buffers
\#*
\.#*

# ignore TAR archives
*.tar

# exclude vc version-check scripts
vc.tex
temp/
*.log

# do not track merge or other orig cpy files
*.orig

# exclude files other than *.c from exsrc
exsrc/*
!exsrc/*.c
!exsrc/*.h
!exsrc/*.cpp
!exsrc/*.hpp
!exsrc/*.hh
!exsrc/*.cc

# Ignore all sample files
sample-*
sample_lecture*

EOF
) > $OUTFILE
# -----------------------------------------------------------

#  Quoting the 'limit string' prevents variable expansion
#  within the body of the above 'here document.'
#  This permits outputting literal strings in the output file.

if [ -f "$OUTFILE" ]
then
  chmod ${_FILE_PERM} ${OUTFILE}
else
  echo "Problem in creating file: \"$OUTFILE\""
fi


exit 0