improve Makefile

- simplify Makefile
- improve devserver
- improve make clean
This commit is contained in:
André Roth
2024-10-04 01:12:12 +02:00
parent 4658bec08b
commit 98c82a3684
13 changed files with 116 additions and 184 deletions
+7 -4
View File
@@ -1,12 +1,15 @@
#!/bin/sh -e
# make sure files are written with correct user ownership
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
if [ -z "$@" ]; then
echo Error: no make target specified
exit 1
args="$@"
if [ -z "$args" ]; then
cmd="bash"
else
cmd="make $@"
fi
cd /work/src
su aptly -c "GOPATH=$PWD/.go make $@"
sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go $cmd