diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-02 22:42:41 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-02 22:42:41 -0500 |
commit | add237f713412e85be7a57c74726b5cd4e69bed9 (patch) | |
tree | 6241c90744b0c0af79931c44f18eda06f4be4e6f /src/chroot-tools/libremakepkg.gpl2 | |
parent | 1676629ba3b7b7fa0b48d455e9a4d6d09823004b (diff) |
libremakepkg: learn '-C' to dissable using the chrootv20121202
Diffstat (limited to 'src/chroot-tools/libremakepkg.gpl2')
-rwxr-xr-x | src/chroot-tools/libremakepkg.gpl2 | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/chroot-tools/libremakepkg.gpl2 b/src/chroot-tools/libremakepkg.gpl2 index fd58d50..9c600ed 100755 --- a/src/chroot-tools/libremakepkg.gpl2 +++ b/src/chroot-tools/libremakepkg.gpl2 @@ -36,6 +36,11 @@ EOF } chroot_extract() { + if $NOCHROOT; then + chcleanup + sudo -u ${LIBREUSER} ${MAKEPKG} ${makepkg_args} -o + return + fi rm -rf "$copydir"/build/* cp PKGBUILD "$copydir/build/" ( @@ -72,14 +77,19 @@ chroot_extract() { } chroot_build() { - chroot_exec -N "sudo -u nobody ${MAKEPKG} ${makepkg_args} -e" + local user=$LIBREUSER + $NOCHROOT || user=nobody + chroot_exec -N "sudo -u ${user} ${MAKEPKG} ${makepkg_args} -e" } chroot_exec() { local flags='' [[ $1 == -N ]] && { flags=$1; shift; } local cmd="$*" - cat >"$copydir/chrootexec" <<EOF + if $NOCHROOT; then + ${cmd} + else + cat >"$copydir/chrootexec" <<EOF #!/bin/bash . /etc/profile export HOME=/build @@ -87,8 +97,9 @@ cd /build ${cmd} EOF - chmod 755 "$copydir/chrootexec" - archroot $flags "$copydir" -r /chrootexec + chmod 755 "$copydir/chrootexec" + archroot $flags "$copydir" -r /chrootexec + fi } copy_pkgs() { |