Commit 83e6857
committed
inline-source: inline also if $srcdir contains spaces
Add new syntax for source inline:
# set '$inline_source_dir' to `dirname "$0"/`
inline_source_dir=`echo "$0" |${SED-sed} 's|[^/]*$||'`
. "$inline_source_dir"/sourced-file
This version avoids "`"sth"`" like commands (nested quotes), while
we are now able to use inline-source script within directory
which pathname contains spaces. As a side effect, we save some
fork() calls because the directory is constructed only once.
Related to github issue #6.
* build-aux/inline-source: Move ourself to the new syntax,
document new syntax.
(func_include): Parse the new syntax, quote $progpath properly.
* build-aux/bootstrap.in: Use new syntax.
* bootstrap: Sync with new sources.1 parent 0d95666 commit 83e6857
3 files changed
+39
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
2822 | 2823 | | |
2823 | 2824 | | |
2824 | 2825 | | |
2825 | | - | |
| 2826 | + | |
2826 | 2827 | | |
2827 | 2828 | | |
2828 | 2829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | | - | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | | - | |
23 | | - | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
| |||
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
132 | 153 | | |
133 | 154 | | |
134 | | - | |
| 155 | + | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
138 | 159 | | |
139 | 160 | | |
140 | | - | |
141 | | - | |
| 161 | + | |
| 162 | + | |
142 | 163 | | |
143 | 164 | | |
144 | 165 | | |
| |||
0 commit comments