summaryrefslogblamecommitdiff
path: root/.tools/manaplus.sh
blob: d24c7f997bad642521b14dd1dfac675d836c1c44 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

           


                  




                       



                                                                               




              
                                                                                    
 
                                    
 
                                         
                            
                                  

                                                       

                                                              





                        
    
#!/bin/bash

spm_branch="$1"
client_branch="$2"

source ./.tools/init.sh

clientdata_init

aptget_update
# Evidently libcurl3-gnutls ships libcurl4-gnutls.so.4
aptget_install \
    libcurl3-gnutls \
    libsdl-gfx1.2 libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 libsdl-ttf2.0 \
    wget unzip

pwd
ls

./clientdata/.tools/downloadlib.sh "$spm_branch" manaplus "$client_branch" || exit 1

export HOME="$PWD/clientdata/shared"

pushd "manaplus_$client_branch" || exit 1
export SDL_VIDEODRIVER=dummy
./bin/manaplus --version || exit 1
./bin/manaplus --validate -u -d ../clientdata || exit 1

[[ -f "${HOME}/.local/share/mana/manaverse.log" ]] || exit 1
grep -A 10 "Assert:" "${HOME}/.local/share/mana/manaverse.log"

if [ "$?" == 0 ]; then
    echo "Asserts found"
    exit 1
fi

popd