#!/bin/sh # Make a snapshot for dolphin-emu from its git repo # Optional argument: commit hash or tag BRANCH=master STABLE=5.0 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 fi if [ $# == 0 ]; then rev="$BRANCH" elif [ $# == 1 ]; then rev="$1" fi git checkout $rev git pull --rebase # The upstream dev snapshot version seems to be the number of commits # since last stable tag snapver="$STABLE.$(git rev-list $STABLE..HEAD | wc -l)" echo -e "=== Exporting $rev revision, dev snapshot number $snapver ===" dirname="dolphin-$snapver" git checkout-index -a -f --prefix="../$dirname/" echo "=== Unbundling unnecessary content ===" popd && pushd $dirname rm -rf .editorconfig .git* .mailmap .tx Source/.clang-format Source/Android Installer/dxredist Installer/vcredist cd Externals rm -rf curl enet ffmpeg gettext hidapi libiconv-1.14 libpng libusb LZO mbedtls miniupnpc \ OpenAL pugixml Qt SFML XAudio2_7 zlib # gtest // no more shared gtest, https://github.com/dolphin-emu/dolphin/commit/9ac94d01358808f9a90e472e44e8a0f6588bdec7 # soundtouch // patched upstream # wxWidgets3 // needs 3.1+ popd echo "=== Generating the tarball ===" tar cvJf $dirname.tar.xz $dirname rm -rf $dirname