-
Notifications
You must be signed in to change notification settings - Fork 1
/
forwardmap-2.sh
executable file
·31 lines (23 loc) · 1.57 KB
/
forwardmap-2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# decrossfuscator - A project to undo the effects of a specific version of Google Closure Compiler for a specific game by mapping between versions.
# Written starting in 2017 by contributors (see CREDITS.txt)
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# Forwardmap makes bringing symbols into the future *practical.*
# Expects 'root' folder as first arg, but will substitute '.' otherwise.
# Expects the 'source' CrossCode version as second arg, but defaults to source
# Expects the 'target' CrossCode version as third arg, but defaults to target
ROOTDIR=${1:-.}
SVERSION=${2:-source}
TVERSION=${3:-target}
SJMF=$ROOTDIR/versions/$SVERSION
TJMF=$ROOTDIR/versions/$TVERSION
SJSF=$SJMF/subdir/assets/js/game.compiled.js
TJSF=$TJMF/subdir/assets/js/game.compiled.js
CCVER=$(basename $(readlink -m $TJMF))
node forwardmap.js $SJSF $SJMF/deobf.map $TJSF $TJMF/deobf.map fixup $CCVER pass2 > $TJMF/deobf-forward.map
cp $TJMF/deobf-forward.map $TJMF/deobf.map
node forwardmap.js $SJSF $SJMF/deobf.map $TJSF $TJMF/deobf.map fixup $CCVER pass3 > $TJMF/deobf-forward.map
cp $TJMF/deobf-forward.map $TJMF/deobf.map
node forwardmap.js $SJSF $SJMF/deobf.map $TJSF $TJMF/deobf.map fixup $CCVER pass4 > $TJMF/deobf-forward.map
cp $TJMF/deobf-forward.map $TJMF/deobf.map