forked from Arks-Layer/PSO2esTranslations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
28 lines (28 loc) · 1.03 KB
/
update.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
#!/bin/sh
git diff --exit-code -- json > /dev/null||echo Unclean JSON folder
git diff --exit-code -- json > /dev/null||exit
echo Waiting for android device
adb wait-for-device
apkpath=$(adb shell pm path com.sega.PhantasyStarOnline2es | _py/_APK_package.py)
adb shell dumpsys package com.sega.PhantasyStarOnline2es| _py/_APK_version.py > /tmp/PSO2ver.txt
mkdir -p apk
echo pulling PSO2 APK
adb shell cp $apkpath /sdcard/PSO2es.zip
adb pull /sdcard/PSO2es.zip apk/PSO2es.zip
adb shell rm /sdcard/PSO2es.zip
echo Extracting DLLs
unzip -jo apk/PSO2es.zip -d apk
echo linking needed DLLs
ln -sf apk/Assembly-CSharp-firstpass.dll .
ln -sf apk/ContentsSerializer.dll .
ln -sf apk/ProtoBuffSerializer.dll .
ln -sf apk/protobuf-net.dll .
ln -sf apk/UnityEngine.dll .
mkdir -p Databases
rm -rf Databases/*
echo Getting stock Database files
adb pull -a /sdcard/Android/data/com.sega.PhantasyStarOnline2es/files/3hwQzp8KE9T1oTpJCHPvxI5JIedD3AuT/. Databases
echo Updating JSONs
mono ESBreakerCLI.exe > /dev/null
git commit --file /tmp/PSO2ver.txt -- json
# ./make.sh