minecraft-pi-docker/scripts/package.sh

28 lines
477 B
Bash
Raw Normal View History

2020-09-27 00:48:46 +00:00
#!/bin/sh
set -e
# Docker Messes With SetGID
chmod -R g-s debian
# Clean out Directory
rm -rf out
2020-10-03 20:18:53 +00:00
mkdir -p out/deb
2020-09-27 00:48:46 +00:00
# Generate DEB
2020-10-10 23:02:13 +00:00
dpkg -b debian/client out/deb
dpkg -b debian/server out/deb
2020-10-03 20:18:53 +00:00
# Export Libraries
mkdir -p out/lib
# Copy Headers
cp -r mods/include out/lib/include
# Copy Shared Library
2020-10-10 23:02:13 +00:00
IMG_ID="$(docker create thebrokenrail/minecraft-pi:client)"
2020-10-15 02:39:30 +00:00
docker cp "${IMG_ID}":/app/minecraft-pi/mods/. ./out/lib/. || :
RET="$?"
2020-10-06 15:08:10 +00:00
docker rm -v "${IMG_ID}"
2020-10-15 02:39:30 +00:00
exit "${RET}"