dosbox-x/build-scripts/macosx/make-macosx-build.sh
Robert de Rooy 694cc766a4 Cleanup Bash scripts.
This makes them pass shellcheck. Except for a few unused
export warnings.

I also wonder if the majority of these files should be
in the root of the project, or should be moved to "build-scripts"
(or should still even exist).

a few minor changes

one more minor changes
2023-04-15 15:53:08 +02:00

54 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Setup:
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x
# git clone https://github.com/joncampbell123/dosbox-x dosbox-x-sdl2
#
# Then run this script
arch=$(uname -m)
name=$(date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g')
name="dosbox-x-macosx-${arch}-${name}.zip"
echo "Will pack to ${name}"
sleep 1
top=$(pwd)
cd "${top}" || exit 1
cd "${top}/dosbox-x" || exit 1
git clean -dfx
git reset --hard
git checkout master
git clean -dfx
git reset --hard
git pull
git clean -dfx
git reset --hard
./build-macos || exit 1
make dosbox-x.app || exit 1
cp CHANGELOG CHANGELOG.txt || exit 1
cp COPYING COPYING.txt || exit 1
cp contrib/macos/readme.txt README.txt || exit 1
cd "${top}/dosbox-x-sdl2" || exit 1
git clean -dfx
git reset --hard
git checkout master
git clean -dfx
git reset --hard
git pull
git clean -dfx
git reset --hard
./build-macos-sdl2 || exit 1
make dosbox-x.app || exit 1
cp CHANGELOG CHANGELOG.txt || exit 1
cp COPYING COPYING.txt || exit 1
cp contrib/macos/readme.txt README.txt || exit 1
cd "${top}" || exit 1
echo "Packing up now..."
zip -r -9 "$name" dosbox-x/dosbox-x.app dosbox-x/CHANGELOG.txt dosbox-x/COPYING.txt dosbox-x/README.txt dosbox-x-sdl2/dosbox-x.app dosbox-x-sdl2/CHANGELOG.txt dosbox-x-sdl2/COPYING.txt dosbox-x-sdl2/README.txt || exit 1
exit 0