aptly/system/docker-wrapper

16 lines
327 B
Bash
Executable File

#!/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
args="$@"
if [ -z "$args" ]; then
cmd="bash"
else
cmd="make $@"
fi
cd /work/src
sudo -u aptly PATH=$PATH:/work/src/build GOPATH=/work/src/.go $cmd