forked from arkane-systems/genie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·25 lines (21 loc) · 918 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
sudo rm -f systemd-genie/usr/bin/*
# Build genie
cd genie
dotnet publish -r linux-x64 --self-contained false
mkdir -p ../systemd-genie/usr/bin/
cp bin/Debug/netcoreapp2.2/linux-x64/publish/genie ../systemd-genie/usr/bin/
cp bin/Debug/netcoreapp2.2/linux-x64/publish/*.dll ../systemd-genie/usr/bin/
cp bin/Debug/netcoreapp2.2/linux-x64/publish/genie.runtimeconfig.json ../systemd-genie/usr/bin/
cd ..
# Set permissions
sudo chown root:root systemd-genie/usr/bin/*
sudo chmod u+s systemd-genie/usr/bin/genie
sudo chmod a+rx systemd-genie/usr/bin/genie
# Compute md5 sums
sudo md5sum systemd-genie/usr/bin/* > systemd-genie/DEBIAN/md5sums
sudo md5sum systemd-genie/lib/genie/* >> systemd-genie/DEBIAN/md5sums
sudo md5sum systemd-genie/lib/systemd/system-environment-generators/* >> systemd-genie/DEBIAN/md5sums
# Build packages
sudo dpkg-deb --build systemd-genie
sudo tar zcvf genie.tar.gz systemd-genie/*