Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 5702b204354d6c7083bfc144c1c8f80b > files > 3

dolphin-emu-5.0-5.mga6.tainted.src.rpm

#!/bin/sh
# Make a snapshot for dolphin-emu from its git repo
# Optional argument: commit hash or tag

if [ ! -e dolphin.git ]; then
    echo "=== Cloning Git repository ==="
    git clone http://github.com/dolphin-emu/dolphin.git dolphin.git
    pushd dolphin.git
else
    echo "=== Updating Git clone ==="
    pushd dolphin.git
    git pull --rebase
fi

if [ $# == 0 ]; then
    rev="master"
    # The upstream dev snapshot version seems to be the number of commits
    # minus 10904 (most likely the first commit in the 4.0 branch)
    snapver="4.0.2+$(expr $(git rev-list HEAD | wc -l) - 10904)"
    echo -e "=== Exporting HEAD revision, dev snapshot number $snapver ==="
elif [ $# == 1 ]; then
    rev="$1"
    snapver=$rev
    echo -e "=== Exporting specified target revision: $1 ==="
fi

dirname="dolphin-$snapver"
git checkout $rev
git checkout-index -a -f --prefix="../$dirname/"

echo "=== Unbundling unnecessary content ==="
popd && pushd $dirname
rm -rf .git* .mailmap Source/.clang-format Source/Android Installer/dxredist
cd Externals
rm -rf d3dx12 enet ffmpeg gettext gtest libiconv-1.14 libpng libusb LZO miniupnpc OpenAL \
       portaudio Qt SFML soundtouch wxWidgets3 XAudio2_7 zlib
popd

echo "=== Generating the tarball ==="
tar cvJf $dirname.tar.xz $dirname

rm -rf $dirname