ci: update rename-namespace.sh to work on non-bash shells (#4153)

This commit is contained in:
stephenp-gr 2022-02-21 15:48:14 +00:00 committed by GitHub
parent c2065bd7fe
commit a2d096eb93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
#!/bin/sh
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]:-$0}" )" >/dev/null && pwd )"
# Rename all com.linkedin.* to com.linkedin.pegasus2avro.*, except for com.linkedin.avro2pegasus.*
find $SCRIPT_ROOT/../mxe-schemas/src/renamed -type f -print0 | \
@ -8,4 +8,4 @@ xargs -0 perl -pi -e 's/com\.linkedin\.(?!avro2pegasus)/com\.linkedin\.pegasus2a
# Rename com.linkedin.avro2pegasus.* to com.linkedin.*
find $SCRIPT_ROOT/../mxe-schemas/src/renamed -type f -print0 | \
xargs -0 perl -pi -e 's/com\.linkedin\.avro2pegasus\./com\.linkedin\./g'
xargs -0 perl -pi -e 's/com\.linkedin\.avro2pegasus\./com\.linkedin\./g'