Skip to content

Commit 581b183

Browse files
author
Michael Buckley
committed
Use perl for portable -i
1 parent d4b5e4d commit 581b183

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apex-source-control

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function legacy_apex_export {
7474

7575
mv "f${apexappid}" apex #
7676

77-
sed -i '' s^@application^@apex/application^ apex/install.sql
77+
perl -pi -e 's^\@application^\@apex/application^' apex/install.sql
7878
}
7979

8080
function apex_export {
@@ -100,7 +100,7 @@ EOF
100100
mv "f${apexappid}" apex
101101

102102
# fixup install paths. The tool generates absolute paths
103-
sed -E -i '' 's^@(.*/)?application/^@apex/application/^' apex/install.sql
103+
perl -pi -e 's^\@/?(.*/)?application/^\@apex/application/^' apex/install.sql
104104
else
105105
echo WARNING: Did not find SQLcl. Using legacy APEXExportSplitter instead
106106
legacy_apex_export
@@ -171,7 +171,7 @@ if [ -h config/asc.conf ]; then
171171
read can_write
172172

173173
if [ "${can_write}" == "y" ]; then
174-
sed -i "s/^apexappid=.*/apexappid=${app_id}/" config/${conf_file}
174+
perl -pi -e "s/^apexappid=.*/apexappid=${app_id}/" config/${conf_file}
175175
echo "apexappid in '${conf_file}' has been replaced with '${app_id}'. The new config file looks like this: "
176176
cat config/${conf_file}
177177
else

0 commit comments

Comments
 (0)