summaryrefslogtreecommitdiff
path: root/replace.sh
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-07-08 16:01:56 -0400
committerGitHub <noreply@github.com>2020-07-08 16:01:56 -0400
commit0816046a73902d513d45a6bc7ab5986384411b5b (patch)
tree0981cc30f2360f9c70b6b58f189525bef0a0381f /replace.sh
parentf75c048434d5dc7538e628206c29a0730404db81 (diff)
parent4672e05560da3f49a9fdb6be1b1a5fa73e8adccd (diff)
Merge pull request #346 from luckytyphlosion/master
Match (almost) all of pokemon_summary_screen.c
Diffstat (limited to 'replace.sh')
-rw-r--r--replace.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/replace.sh b/replace.sh
new file mode 100644
index 000000000..8ec32d944
--- /dev/null
+++ b/replace.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# $1: phrase to find
+# $2: phrase to replace $1
+if [ "$1" = "" -o "$2" = "" ]; then
+ echo "Usage: replace.sh [PHRASE TO FIND] [PHRASE TO REPLACE PHRASE TO FIND]"
+ exit 0
+fi
+
+sed -i 's/\<'"$1"'\>/'"$2"'/' $(grep -lwr --include="*.s" --include="*.h" --include="*.c" --include="*.inc" --include="*.json" --include="*.txt" --exclude-dir="tools" --exclude-dir=".git" --exclude-dir="build" --exclude-dir="berry_fix/build" --exclude-dir="berry_fix/payload/build" --exclude-dir=".travis" "$1")