Update code that removes comments and trailing whitespace so it works on OSX

This commit is contained in:
Trevor Brown 2019-03-27 08:39:41 -04:00 committed by Trevor Brown
parent 28cf1a74b9
commit 603665ebda

View File

@ -579,7 +579,7 @@ strip_tool_version_comments() {
while IFS= read -r tool_line || [ -n "$tool_line" ]; do
# Remove whitespace before pound sign, the pound sign, and everything after it
new_line="$(echo "$tool_line" | sed -r -e 's/(\s*\#.*)//')"
new_line="$(echo "$tool_line" | cut -f1 -d"#" | sed -e 's/[[:space:]]*$//')"
# Only print the line if it is not empty
if [[ ! -z "$new_line" ]]; then