add rap file generation
authorMazet Laurent <mazet@softndesign.org>
Sun, 10 Dec 2023 21:14:10 +0000 (22:14 +0100)
committerMazet Laurent <mazet@softndesign.org>
Sun, 10 Dec 2023 21:14:10 +0000 (22:14 +0100)
iso2ps2

diff --git a/iso2ps2 b/iso2ps2
index 8f872f5f39c8d32acb0b001342e2e7735ce80feb..4309809271b306c373fff98ea2f2cddd230e2821 100755 (executable)
--- a/iso2ps2
+++ b/iso2ps2
@@ -54,8 +54,8 @@ function getname () {
 }
 
 # get game title
-[ -f PS2-GAMEID-TITLE-MASTER.csv ] || wget https://raw.githubusercontent.com/VTSTech/PS2-OPL-CFG/master/test/PS2-GAMEID-TITLE-MASTER.csv
-title=$(awk -F\; '"'$serial'" == $1 {print $2}' PS2-GAMEID-TITLE-MASTER.csv)
+[ -f "$CACHE/PS2-GAMEID-TITLE-MASTER.csv" ] || ( cd "$CACHE"; wget https://raw.githubusercontent.com/VTSTech/PS2-OPL-CFG/master/test/PS2-GAMEID-TITLE-MASTER.csv )
+title=$(awk -F\; '"'$serial'" == $1 {print $2}' "$CACHE/PS2-GAMEID-TITLE-MASTER.csv")
 [ "$title" ] || title=$(basename "$file" | sed 's/ *(.*//')
 
 # create CID
@@ -74,7 +74,7 @@ echo "CID: $cid"
 # install skeleton
 title "install skeleton"
 mkdir $serial
-tar -C $serial -xzf skeleton.tgz
+tar -C $serial -xzf $PWD/skeleton.tgz
 [ -d "$CACHE" ] || mkdir "$CACHE"
 
 # images:
@@ -149,6 +149,7 @@ else
         ;;
     SLIM|SUPER|ULTRA)
         config=$(cd $CONFIGS; find CUSTOM SOFT NET -name $confname | head -1)
+        #config=$(cd $CONFIGS; find SOFT NET -name $confname | head -1)
         ;;
     esac
     if [ "$config" ]; then
@@ -181,6 +182,10 @@ title "create package"
 ( cd $serial; $PSNPACKAGE package.conf . ) || fail "can't create package"
 mv $serial/$cid.pkg .
 
+# create rap file
+title "create rap file"
+cp $PWD/iso2ps2.rap $cid.rap
+
 # cleaning
 title "cleaning"
 rm -rf $serial