Skip to content
This repository has been archived by the owner on Feb 18, 2018. It is now read-only.

Commit

Permalink
🎊 Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 committed Oct 21, 2017
0 parents commit 62f3cde
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
17 changes: 17 additions & 0 deletions custom_boxart.hmod/S51customboxart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Init scripts are executed with "start" argument when system boots and with "stop" argument during shutdown
# So we need to check that it's boot state, not shutdown
[ -z "$1" ] || [ "$1" == "start" ] || exit 0

source "/etc/preinit"
script_init

ls -l "$squashfs$gamepath" | grep 'CLV-' | awk '{ print $9 }' | while read gamecode; do
if [ -f "$installpath/boxart/$gamecode.png" ]; then
mount -o bind "$installpath/boxart/$gamecode.png" "$squashfs$gamepath/${gamecode}/${gamecode}.png"
fi
if [ -f "$installpath/boxart/${gamecode}_small.png" ]; then
mount -o bind "$installpath/boxart/${gamecode}_small.png" "$squashfs$gamepath/${gamecode}/${gamecode}_small.png"
fi
done < /dev/stdin
Binary file added custom_boxart.hmod/gamecodes.txt
Binary file not shown.
5 changes: 5 additions & 0 deletions custom_boxart.hmod/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local script="S51customboxart"
copy "$script" "$rootfs/etc/init.d/"
chmod +x "$rootfs/etc/init.d/$script"
mkdir -p "$installpath/boxart/"
return 1
12 changes: 12 additions & 0 deletions custom_boxart.hmod/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
=== Custom Boxart ===

This module creates a folder at /var/lib/hakchi/boxart

You can upload custom boxart png images over FTP to this folder.

Example filenames:

CLV-P-SAABE.png
CLV-P-SAABE_small.png

If any of the two files exist for the respective game code, it will be used instead of the stock.
3 changes: 3 additions & 0 deletions custom_boxart.hmod/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
local script="S51customboxart"
rm "$rootfs/etc/init.d/$script"
rm -r "$installpath/boxart/"

0 comments on commit 62f3cde

Please sign in to comment.