Browse Source

xlat/gen.sh: disable file name globbing by default

As the script uses file name globbing only in one place,
disable it by default and enable it when necessary.

* xlat/gen.sh: Add -f to shebang.
(main): Enable file name globbing to generate the list of input files.
Dmitry V. Levin 9 months ago
parent
commit
6b05c7c16b
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      xlat/gen.sh

+ 5
- 2
xlat/gen.sh View File

@@ -1,4 +1,4 @@
1
-#!/bin/sh -eu
1
+#!/bin/sh -efu
2 2
 #
3 3
 # Copyright (c) 2014-2015 Mike Frysinger <vapier@gentoo.org>
4 4
 # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
@@ -309,7 +309,10 @@ main()
309 309
 
310 310
 	if [ -d "${input}" ]; then
311 311
 		local f names=
312
-		for f in "${input}"/*.in; do
312
+		set +f
313
+		set -- "${input}"/*.in
314
+		set -f
315
+		for f; do
313 316
 			[ -f "${f}" ] || continue
314 317
 			name=${f##*/}
315 318
 			name=${name%.in}

Loading…
Cancel
Save