diff options
author | ng0 <ng0@n0.is> | 2019-12-02 17:34:07 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-12-02 17:34:07 +0000 |
commit | 339d7a7d8ca789f9777501c3092e5c7ea0c4850a (patch) | |
tree | 5110bf9188f3c0c6d102cd4bf45d2325a5ff4136 /bin | |
parent | 79ff68acae7e4774881d6bc53fc5c639da4a2e7b (diff) | |
parent | fdf8c95a33fe6c81c93cd17ed7a38b8b55df7d54 (diff) | |
download | gnunet-netbsd-support.tar.gz gnunet-netbsd-support.zip |
Merge branch 'master' into netbsd-supportnetbsd-support
Diffstat (limited to 'bin')
-rw-r--r-- | bin/Makefile.am | 6 | ||||
-rwxr-xr-x | bin/dosubst.awk | 47 |
2 files changed, 53 insertions, 0 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 000000000..6c11e26ef --- /dev/null +++ b/bin/Makefile.am | |||
@@ -0,0 +1,6 @@ | |||
1 | EXTRA_DIST = \ | ||
2 | dosubst.awk \ | ||
3 | grephdr.sh \ | ||
4 | grepsrc.sh \ | ||
5 | pogen.sh \ | ||
6 | rename.sh | ||
diff --git a/bin/dosubst.awk b/bin/dosubst.awk new file mode 100755 index 000000000..3ed0403dd --- /dev/null +++ b/bin/dosubst.awk | |||
@@ -0,0 +1,47 @@ | |||
1 | # Dedicated to the public domain. | ||
2 | # SPDX-License-Identifier: 0BSD | ||
3 | # | ||
4 | # awk script to substitute variables in scripts and applications. | ||
5 | # | ||
6 | # You can pass these variables to it in Makefiles or on the | ||
7 | # commandline: | ||
8 | # bdir="$(bindir)" | ||
9 | # py="$(PYTHON)" | ||
10 | # awkay="$(AWK_BINARY)" | ||
11 | # pfx="$(prefix)" | ||
12 | # prl="$(PERL)" | ||
13 | # sysconfdirectory="$(sysconfdir)" | ||
14 | # pkgdatadirectory="$(pkgdatadir)" | ||
15 | |||
16 | { | ||
17 | |||
18 | if (/@bindirectory@/) { | ||
19 | gsub("@bindirectory@",bdir) ; | ||
20 | } | ||
21 | |||
22 | if (/@PYTHONEXE@/) { | ||
23 | gsub("@PYTHONEXE@",py) ; | ||
24 | } | ||
25 | |||
26 | if (/@AWKEXE@/) { | ||
27 | gsub("@AWKEXE@",awkay) ; | ||
28 | } | ||
29 | |||
30 | if (/@SUBSTPREFIX@/) { | ||
31 | gsub("@SUBSTPREFIX@",pfx) ; | ||
32 | } | ||
33 | |||
34 | if (/@PERLEXE@/) { | ||
35 | gsub("@PERLEXE@",prl) ; | ||
36 | } | ||
37 | |||
38 | if (/@SYSCONFDIR@/) { | ||
39 | gsub("@SYSCONFDIR@",sysconfdirectory) ; | ||
40 | } | ||
41 | |||
42 | if (/@PKGDATADIRECTORY@/) { | ||
43 | gsub("@PKGDATADIRECTORY@",pkgdatadirectory) ; | ||
44 | } | ||
45 | |||
46 | print $0 ; | ||
47 | } | ||