Files
aptly/system/docker-wrapper
Ryan Gonzalez 568a9ce4d5 docker: Preserve the go build cache
Otherwise, every `make docker-...` invocation will need to rebuild
everything from scratch.
2025-09-23 16:25:46 -05:00

19 lines
484 B
Bash
Executable File

#!/bin/sh -e
# make sure files are written with correct user ownership
if [ `stat -c %u /work/src` -ne 0 ]; then
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
fi
args="$@"
if [ -z "$args" ]; then
cp /work/src/completion.d/aptly /usr/share/bash-completion/completions/
cmd="bash"
else
cmd="make $@"
fi
cd /work/src
sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go GOCACHE=/work/src/.go/cache $cmd