forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace AWK with Bash scripts (dotnet#46313)
* Replace AWK with Bash scripts * Replace awk usage with Bash or POSIX tr * Simplify genmoduleindex.sh
- Loading branch information
Showing
31 changed files
with
281 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
saved=("$@") | ||
while test $# -gt 0; do | ||
case "$1" in | ||
--help|-h) | ||
printf "Usage:\ngenerateexportedsymbols.sh <filename>\n" | ||
exit 1;; | ||
esac | ||
shift | ||
done | ||
set -- "${saved[@]}" | ||
|
||
while read -r line; do | ||
# Skip empty lines and comment lines starting with semicolon | ||
if [[ "$line" =~ ^\;.*$|^[[:space:]]*$ ]]; then | ||
continue | ||
fi | ||
|
||
# Remove the CR character in case the sources are mapped from | ||
# a Windows share and contain CRLF line endings | ||
line="${line//$'\r'/}" | ||
|
||
printf "_%s\n" "${line//#/}" | ||
done < "$1" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
saved=("$@") | ||
while test $# -gt 0; do | ||
case "$1" in | ||
--help|-h) | ||
printf "Usage:\ngenerateversionscript.sh <filename> <prefix>\n" | ||
exit 1;; | ||
esac | ||
shift | ||
done | ||
set -- "${saved[@]}" | ||
|
||
prefix="$2" | ||
|
||
printf "V1.0 {\n global:\n" | ||
|
||
while read -r line; do | ||
# Skip empty lines and comment lines starting with semicolon | ||
if [[ "$line" =~ ^\;.*$|^[[:space:]]*$ ]]; then | ||
continue | ||
fi | ||
|
||
# Remove the CR character in case the sources are mapped from | ||
# a Windows share and contain CRLF line endings | ||
line="${line//$'\r'/}" | ||
|
||
# Only prefix the entries that start with "#" | ||
if [[ "$line" =~ ^#.*$ ]]; then | ||
printf " %s%s;\n" "$prefix" "${line//#/}" | ||
else | ||
printf " %s;\n" "$line" | ||
fi | ||
done < "$1" | ||
|
||
printf " local: *;\n};\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.