r7629 - ! dirs' list truncated !

Jon Dowland jmtd-guest at alioth.debian.org
Mon Jun 30 20:37:24 UTC 2008


Author: jmtd-guest
Date: 2008-06-30 20:37:24 +0000 (Mon, 30 Jun 2008)
New Revision: 7629

Modified:
   packages/branches/game-package/support_quake3/supported/quake3
Log:
handle fetching the pak0.pk3

Modified: packages/branches/game-package/support_quake3/supported/quake3
===================================================================
--- packages/branches/game-package/support_quake3/supported/quake3	2008-06-30 20:20:05 UTC (rev 7628)
+++ packages/branches/game-package/support_quake3/supported/quake3	2008-06-30 20:37:24 UTC (rev 7629)
@@ -40,8 +40,22 @@
 find_pak0() {
     # identify where pak0.pk3 is (underneath the CD-ROM mount-point)
     # and set the relevant variable
+
+    if   [ -f "$CDROM/Quake3/baseq3/pak0.pk3" ]; then
+        PAKFILE="$CDROM/Quake3/baseq3/pak0.pk3"
+    elif [ -f "$CDROM/baseq3/pak0.pk3" ]; then
+        PAKFILE="$CDROM/baseq3/pak0.pk3"
+    else
+        PAKFILE=`find "$CDROM" -type f -name "pak0.pk3" | head -1`
+    fi
+    if [ "" = "$PAKFILE" ]; then
+        echo "couldn't find pak0.pk3 under $CDROM." >&2
+        exit 1
+    fi
+    cp -p "$PAKFILE" "$WORKDIR/pak0.pk3"
 }
 
+# TODO: roll a more advanced check_sums into the game-package-shared
 check_sums() {
     POINTMD5=c71fdddccb20e8fc393d846e9c61d685
     SUM=`md5sum "$WORKDIR/$POINTFILE" | cut -d' ' -f1`
@@ -49,11 +63,15 @@
         echo "error: $POINTFILE sum ($SUM) does not match expected sum" >&2
         echo "($POINTMD5)" >&2
         exit 1
-    else
-        echo "sum is good"
     fi
-    # TODO: also check pak0.pk3
-    # TODO: roll a more advanced check_sums into the game-package-shared
+
+    PAK0MD5=1197ca3df1e65f3c380f8abc10ca43bf
+    SUM=`md5sum $WORKDIR/pak0.pk3 | cut -d' ' -f1`
+    if [ "$SUM" != "$PAK0MD5" ]; then
+        echo "error: $POINTFILE sum ($SUM) does not match expected sum" >&2
+        echo "($PAK0MD5)" >&2
+        exit 1
+    fi
 }
 
 unpack_point() {
@@ -77,10 +95,5 @@
 }
 
 # stuff imported from quake3-data postinst, to be integrated
-
-Q3TGZ=quake3.tar.gz
 BASEQ3=/usr/share/games/quake3/baseq3
 
-# we need pak0.pk3 from the quake3 CD-ROM. It lives at 
-# ./Quake3/baseq3/pak0.pk3 on a regular q3 cd and
-# ./baseq3/pak0.pk3 on a loki CD-ROM.




More information about the Pkg-games-commits mailing list