forked from natinusala/borealis
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM vitasdk/vitasdk:latest | ||
|
||
ADD psv_debug.sh . | ||
|
||
RUN apk update && \ | ||
apk add python3 py3-pip && \ | ||
wget https://github.com/xyzz/vita-parse-core/archive/refs/heads/master.zip && \ | ||
unzip master.zip && \ | ||
rm master.zip && \ | ||
pip install -r vita-parse-core-master/requirements.txt --break-system-packages && \ | ||
sed -i 's/from collections import MutableMapping/from collections.abc import MutableMapping/g' `python -c "import site; print(site.getsitepackages()[0])"`/elftools/construct/lib/container.py | ||
|
||
WORKDIR /vita-parse-core-master | ||
ENTRYPOINT ["/psv_debug.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# This script is used to request the latest crash report from the PSV homebrew FTP server | ||
# Tested with: https://github.com/devnoname120/vitacompanion | ||
# Author: https://github.com/xfangfang | ||
|
||
if [ $# -lt 2 ]; then | ||
echo -e "This script is used to request the latest crash report from the PSV homebrew FTP server" | ||
echo -e "Usage: docker run --rm -v "'$(pwd)'":/src xfangfang/vita_parse <ftp_config> <elf_path>" | ||
echo -e "Example: \n\tdocker run --rm -v "'$(pwd)'":/src xfangfang/vita_parse ftp://192.168.1.140:1337 main.elf" | ||
exit 1 | ||
fi | ||
|
||
ftp_server="$1" | ||
elf_path="$2" | ||
reports_dir="ux0:/data" | ||
|
||
echo "===> Using FTP Config: $ftp_server" | ||
echo "===> Requesting crash report list from $ftp_server/$reports_dir" | ||
crash_report_path="$(curl -s "$ftp_server"/$reports_dir/ | awk '/\.psp2dmp/ {print $9}' | sort -r | head -n 1)" | ||
|
||
echo "===> Requesting latest report: $ftp_server/$reports_dir/$crash_report_path" | ||
curl -o "$crash_report_path" -s "$ftp_server"/$reports_dir/"$crash_report_path" | ||
echo "===> Saving crash report to $crash_report_path" | ||
|
||
python main.py "$crash_report_path" /src/"$elf_path" | ||
|
||
rm -f "$crash_report_path" |