POSIX compliance: (most) shell scripts converted to generic shell

Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.
This commit is contained in:
George Pickering 2019-11-02 16:34:54 +00:00 committed by Andreas Kling
commit 704f48d7f3
Notes: sideshowbarker 2024-07-19 11:27:45 +09:00
43 changed files with 152 additions and 144 deletions

View file

@ -1,10 +1,8 @@
#!/bin/bash
#!/bin/sh
echo "extern const char $1[];"
echo "const char $1[] = \"\\"
IFS=$'\n'
for line in $(cat $2); do
echo $line"\\"
grep -v '^ *#' < "$2" | while IFS= read -r line; do
echo "$line""\\"
done
echo "\";"