#!/bin/sh # SPDX-FileCopyrightText: 2023 Vasilij Schneidermann # # SPDX-License-Identifier: GPL-3.0-or-later GAME_VERSION=0.0.2 UNIFONT_HEX=unifont-15.0.04.hex UNIFONT_GZIP=$UNIFONT_HEX.gz UNIFONT_GZIP_URL=https://unifoundry.com/pub/unifont/unifont-15.0.04/font-builds/$UNIFONT_GZIP UNIFONT_GLYPHS_EL=unifont-glyphs.el XELB_DIR=xelb-0.18 XELB_TAR=xelb-0.18.tar XELB_TAR_URL=https://elpa.gnu.org/packages/$XELB_TAR cd $(dirname $0) if ! [ -f "$UNIFONT_GZIP" ]; then curl -sO "$UNIFONT_GZIP_URL" fi if ! [ -f "$UNIFONT_HEX" ]; then gzip -dk "$UNIFONT_GZIP" fi if ! [ -f "$UNIFONT_GLYPHS_EL" ]; then emacs --batch -L . -l gen-unifont-glyphs -f gen-unifont-glyphs-cli \ "$UNIFONT_HEX" > "$UNIFONT_GLYPHS_EL" fi if ! [ -d vendor/ ]; then mkdir vendor fi if ! [ -f "$XELB_TAR" ]; then curl -sO "$XELB_TAR_URL" fi if ! [ -d vendor/"$XELB_DIR" ]; then tar -C vendor -xf "$XELB_TAR" emacs --batch -L vendor/"$XELB_DIR" -f batch-byte-compile \ vendor/"$XELB_DIR"/*.el fi if ! [ -f xcb-boomshine.elc ]; then emacs --batch -L vendor/"$XELB_DIR" -L . -f batch-byte-compile \ xcb-boomshine.el fi emacs --batch -L vendor/"$XELB_DIR" -L . -f batch-byte-recompile-directory . if ! [ -d xcb-boomshine-"$GAME_VERSION" ]; then mkdir xcb-boomshine-"$GAME_VERSION" cp -R vendor xcb-boomshine-"$GAME_VERSION"/ cp LICENSE README.md build.sh clean.sh launch.sh \ gen-unifont-glyphs.el unifont-glyphs.el \ xcb-boomshine.el xcb-boomshine.elc xcb-boomshine-"$GAME_VERSION"/ tar -czf xcb-boomshine-"$GAME_VERSION".tar.gz \ xcb-boomshine-"$GAME_VERSION"/ fi