improve Makefile

- simplify Makefile
- improve devserver
- improve make clean
This commit is contained in:
André Roth committed 2024-10-08 01:22:10 +02:00
1 parent 4658bec08b
commit 98c82a3684
13 files changed
+116 -184

No files matched your search

+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