Explorar o código

bug on sndlist maker. check for real game.so

Paul Klumpp %!s(int64=11) %!d(string=hai) anos
pai
achega
a08ac5c841
Modificáronse 2 ficheiros con 21 adicións e 11 borrados
  1. 18 10
      q2compile/make_and_put_all.sh
  2. 3 1
      q2srv/action/h_admin/make_sndlist.sh

+ 18 - 10
q2compile/make_and_put_all.sh

@@ -149,16 +149,24 @@ function main {
             # install it
             case "${repo[$idx]}" in
                 aq2-tng)
-                    cp -v game$ARCH.so $q2srv/action/game$ARCH.real.so
-                    cd ..
-                    cd action
-                    cp -v prules.ini $q2srv/action/
-                    cp -vr doc/ $q2srv/action/
-                    cp -vr models/ $q2srv/action/
-                    cp -vr pics/ $q2srv/action/
-                    cp -vr players/ $q2srv/action/
-                    cp -vr sound/ $q2srv/action/
-                    cp -vr tng/ $q2srv/action/
+                    if [ -f "game$ARCH.so" ]; then
+                        cp -v game$ARCH.so $q2srv/action/game$ARCH.real.so
+                        cd ..
+                        cd action
+                        cp -v prules.ini $q2srv/action/
+                        cp -vr doc/ $q2srv/action/
+                        cp -vr models/ $q2srv/action/
+                        cp -vr pics/ $q2srv/action/
+                        cp -vr players/ $q2srv/action/
+                        cp -vr sound/ $q2srv/action/
+                        cp -vr tng/ $q2srv/action/
+                    else
+                        echo "Whaaat? . aq2-tng did not compile. Something was wrong."
+                        echo
+                        echo "Please find the error messages of the compilation happening above and"
+                        echo "file them as an issue at https://github.com/hifi/aq2-tng"
+                        exit
+                    fi
                 ;;
                 q2admin)
                     if [ -f "game$ARCH.so" ]; then

+ 3 - 1
q2srv/action/h_admin/make_sndlist.sh

@@ -10,7 +10,9 @@ ACTIONDIR=$(pwd)
 SNDDIR=$ACTIONDIR/sound/user
 CFGDIR=$ACTIONDIR/config
 cd $SNDDIR
-find -type f -iname "*wav" | sed -e 's/\.\///' $CFGDIR/sndlist.ini.current
+echo "looking for all .wav files inside: $(pwd)"
+find -type f -iname "*wav" | sed -e 's/\.\///' > $CFGDIR/sndlist.ini.current
 cd $CFGDIR
 cp sndlist.ini.header sndlist.ini
 sort sndlist.ini.current >> sndlist.ini
+echo "file sndlist.ini should be created now inside: $(pwd)"