File: instgen

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (45 lines) | stat: -rwxr-xr-x 802 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
export LANG=C
find 0*_* *.html *.css -type f -print | sort | awk '
BEGIN {
	print "### autogenerated, DO NOT EDIT (but do commit); run make regen on *NIX ###"
	print "install_all:"
}
($0 ~ "[/][.]") { next }
($0 ~ "[/]src[/]") { next }
/[.]bak$/ { next }
/[.]backup$/ { next }
/^ps_title/ { next }
/^index_pdf.html/ { next }
/~$/ { next }

function get_svn_st(path,  st,cmd)
{
	cmd="svn stat " path
	cmd | getline st
	close(cmd)
	return st;
}

($0 ~ "/") {
	path = $0

	# don not list temp files
	if (get_svn_st(path) ~ "[^?]")
		next

	sub("/[^/]*$", "", path)
	if (!(path in PATHS)) {
		print "	$(SCCBOX) mkdir -p $(USERDIR)/" path
		PATHS[path]=1
	}
}

{
	# don not list temp files
	if (get_svn_st($0) ~ "[^?]")
		next

	print "	$(SCCBOX) $(HOW) " $0 " $(USERDIR)/" $0
}
' > Makefile.inst