mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
319500e4f3
This commit includes following fixes for a few shell scripts: 1. Follow the best practice of quoting variables everywhere unless they are used in places where word-splitting and globbing can never happen. 2. Replace `command` with $(command) because the latter is easier to use and read. 3. Don't use "$@" in places expecting a string because it is an array of strings instead of a single string.
15 lines
360 B
Bash
Executable File
15 lines
360 B
Bash
Executable File
#!/bin/sh
|
|
|
|
outputfile=$1
|
|
shift
|
|
|
|
echo '/* ** This file is autogenerated. Do not edit. ** */' > "$outputfile"
|
|
echo '' >> "$outputfile"
|
|
echo 'const char *test_unit_names[] = {' >> "$outputfile"
|
|
|
|
for test_source_file in "$@"; do
|
|
echo " \"$(echo "$test_source_file" | sed 's/.*\(test-[a-z0-9\-]\+\)\.c/\1/')\"," >> "$outputfile"
|
|
done
|
|
|
|
echo '};' >> "$outputfile"
|