18 lines
293 B
Bash
18 lines
293 B
Bash
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
|
|
APKDIR="/apps/$1"
|
|
shift
|
|
#test -d "$1" ==
|
|
#APKDIR=
|
|
#cd /apk/$1;
|
|
#shift
|
|
VOLUID="$(stat -c "%u" "$APKDIR")";
|
|
VOLGID="$(stat -c "%g" "$APKDIR")";
|
|
#CMD="${*:-"make"}"
|
|
cd "$APKDIR"
|
|
test -z "$*" && set -- make
|
|
setpriv --reuid $VOLUID --regid $VOLGID --clear-groups sh -c "$*"
|
|
|