mirror of https://github.com/pret/pokecrystal.git
sort_symfile: don't overwrite the symfile with an intermediate file
This commit is contained in:
parent
2dd2ec97f1
commit
1baea408e2
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
TEMP_FILE=$(mktemp)
|
||||||
sed \
|
sed \
|
||||||
-e "s/^..:[0-3]/0_ROM0@&/g" \
|
-e "s/^..:[0-3]/0_ROM0@&/g" \
|
||||||
-e "s/^..:[4-7]/1_ROMX@&/g" \
|
-e "s/^..:[4-7]/1_ROMX@&/g" \
|
||||||
|
@ -7,6 +8,6 @@ sed \
|
||||||
-e "s/^00:[C-D]/4_WRAM0@&/g" \
|
-e "s/^00:[C-D]/4_WRAM0@&/g" \
|
||||||
-e "s/^..:[D-D]/5_WRAMX@&/g" \
|
-e "s/^..:[D-D]/5_WRAMX@&/g" \
|
||||||
$1 \
|
$1 \
|
||||||
| sort -o $1
|
| sort -o $TEMP_FILE
|
||||||
TEMP_FILE=$(mktemp)
|
sed -e "s/^.*@//g" $TEMP_FILE > $1
|
||||||
sed -e "s/^.*@//g" $1 > $TEMP_FILE && mv $TEMP_FILE $1
|
rm $TEMP_FILE
|
||||||
|
|
Loading…
Reference in New Issue