diff options
author | Jan Steffens <jan.steffens@gmail.com> | 2011-03-13 18:09:52 +0100 |
---|---|---|
committer | Jan Steffens <jan.steffens@gmail.com> | 2011-03-18 12:04:26 +0100 |
commit | 5434d3991cd51873f987bde49d55948341c09f3e (patch) | |
tree | 3c4f262f931fa9da4d3ef5c48be077d3007a9ffc | |
parent | 36dc5d8792599c547889fcaa30052b7c09e7add0 (diff) | |
download | devtools32-5434d3991cd51873f987bde49d55948341c09f3e.tar.xz |
Remove sudo from archbuild
Archbuild should be called via sudo.
-rwxr-xr-x | archbuild | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -29,20 +29,25 @@ while getopts 'cr:' arg; do esac done +if [ "$EUID" != '0' ]; then + echo 'This script must be run as root.' + exit 1 +fi + if ${clean_first} || [ ! -d "${chroots}/${repo}-${arch}" ]; then echo "Creating chroot for [${repo}] (${arch})..." - sudo rm -rf ${chroots}/${repo}-${arch} - sudo mkdir -p ${chroots}/${repo}-${arch} - setarch ${arch} sudo mkarchroot \ + rm -rf ${chroots}/${repo}-${arch} + mkdir -p ${chroots}/${repo}-${arch} + setarch ${arch} mkarchroot \ -C /usr/share/devtools/pacman-${repo}.conf \ -M /usr/share/devtools/makepkg-${arch}.conf \ ${chroots}/${repo}-${arch}/root \ ${base_packages} else - setarch ${arch} sudo mkarchroot \ + setarch ${arch} mkarchroot \ -u \ ${chroots}/${repo}-${arch}/root fi echo "Building in chroot for [${repo}] (${arch})..." -setarch ${arch} sudo makechrootpkg -c -r ${chroots}/${repo}-${arch} +setarch ${arch} makechrootpkg -c -r ${chroots}/${repo}-${arch} |