1
0
mirror of https://github.com/azlux/dpkg-deb synced 2024-11-23 06:46:18 +00:00
dpkg-deb/sheepit/build-package
Azlux eacae887b2 load cuda uvm before sheepit
sheepit still start if load fail
2020-09-08 17:37:49 +02:00

29 lines
884 B
Bash
Executable File

#!/usr/bin/env bash
# Exit the script if any of the commands fail
set -e
set -u
set -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
VERSION=$(curl -s 'https://www.sheepit-renderfarm.com/media/applet/client-info.php?get=version')
STARTDIR="$(pwd)"
DESTDIR="$STARTDIR/pkg"
OUTDIR="$STARTDIR/deb"
rm -rf "$DESTDIR" "$OUTDIR"
wget -q https://www.sheepit-renderfarm.com/media/applet/client-latest.php -O "$STARTDIR/sheepit-client.jar"
install -Dm 755 "$STARTDIR/sheepit-client.jar" "$DESTDIR/usr/lib/sheepit-client.jar"
install -Dm 755 "$STARTDIR/load_cuda.sh" "$DESTDIR/usr/local/sbin/load_cuda.sh"
install -Dm 644 "$STARTDIR/sheepit.service" "$DESTDIR/etc/systemd/system/sheepit.service"
mkdir -p "$DESTDIR/DEBIAN"
cp "$STARTDIR/DEBIAN/"* "$DESTDIR/DEBIAN/"
sed -i "s/VERSION-TO-REPLACE/$VERSION/" "$DESTDIR/DEBIAN/control"
mkdir "$OUTDIR"
dpkg-deb --build "$DESTDIR" "$OUTDIR"