shithub: pokecrystal

Download patch

ref: 06e169d01c1fc08aa02b3401eb8e5e3aa5e7fa9d
parent: dbf05e48ebe2cd841a3d710f5bc9f24db2f068a0
parent: e58688c09b76f097aa011af2cae0d25773817f09
author: yenatch <yenatch@gmail.com>
date: Tue Jun 5 19:24:23 EDT 2018

Merge pull request #516 from Ben10do/remove-gnu-sed-extensions

Don’t use GNU extensions when calling sed

--- a/tools/sort_symfile.sh
+++ b/tools/sort_symfile.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
-sed $1 \
+TEMP_FILE=$(mktemp)
+sed \
     -e "s/^..:[0-3]/0_ROM0@&/g" \
     -e "s/^..:[4-7]/1_ROMX@&/g" \
     -e "s/^..:[8-9]/2_VRAM@&/g" \
@@ -6,5 +7,7 @@
     -e "s/^..:[A-B]/3_SRAM@&/g" \
     -e "s/^00:[C-D]/4_WRAM0@&/g" \
     -e "s/^..:[D-D]/5_WRAMX@&/g" \
-| sort -o $1
-sed -i $1 -e "s/^\w*@//g"
+    $1 \
+| sort \
+| sed -e "s/^.*@//g" > $TEMP_FILE
+mv $TEMP_FILE $1