check INS for misc stuff

This commit is contained in:
Kyan 2025-10-25 20:05:13 +02:00
parent 3966022914
commit 3eb3659f71
3 changed files with 17 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,5 +1,7 @@
images/* images/*
imagestore/app/*.app imagestore/app/*.app
imagestore/vhd/*.vhd imagestore/vhd/*.vhd
imagestore/misc/ICF1
imagestore/misc/*.zip
customcharts/* customcharts/*
.config .config

View file

@ -0,0 +1 @@
The script will place various dependencies here

15
init.sh
View file

@ -46,9 +46,9 @@ get_required_app () {
import_from_ins () { import_from_ins () {
result=$(blkid | grep SEGA_INS | head -n 1 | cut -d: -f1 ) result=$(blkid | grep SEGA_INS | head -n 1 | cut -d: -f1 )
if [ -n "${result:-}" ]; then if [ -n "${result:-}" ]; then
echo "Checking SEGA_INS for SDFE .app files..."
udisksctl mount --block-device $result udisksctl mount --block-device $result
mount_point=$(findmnt -n -o TARGET $result) mount_point=$(findmnt -n -o TARGET $result)
echo "Checking SEGA_INS for SDFE .app files..."
for file in $mount_point/SDFE*.app; do for file in $mount_point/SDFE*.app; do
basename=$(basename $file) basename=$(basename $file)
if [ -f "imagestore/app/$basename" ]; then if [ -f "imagestore/app/$basename" ]; then
@ -58,6 +58,19 @@ import_from_ins () {
pv $file > imagestore/app/$basename pv $file > imagestore/app/$basename
fi fi
done done
echo "Checking SEGA_INS for .icf files..."
for file in $mount_point/*.icf; do
basename=$(basename $file)
echo "$basename: Adding file."
pv $file > imagestore/misc/ICF1
done
echo "Checking SEGA_INS for segatools.zip..."
for file in $mount_point/segatools.zip; do
basename=$(basename $file)
echo "$basename: Adding file."
pv $file > imagestore/misc/segatools.zip
done
udisksctl unmount --block-device $result udisksctl unmount --block-device $result
else else
echo "SEGA_INS not found, skipping." echo "SEGA_INS not found, skipping."