diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-11-01 15:33:08 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-11-01 15:33:08 +0100 |
commit | aaa68e49e8e5a68950a63b9aa4a8c1f6aed2e2d2 (patch) | |
tree | f28082b5951313ca95959c82be1b0ad357e55290 /archbuild.in | |
parent | 7c78599a61e3652f43fce33826aef7b443590b83 (diff) | |
download | devtools-aaa68e49e8e5a68950a63b9aa4a8c1f6aed2e2d2.tar.xz |
Move common functions to a shared file
* common.sh is included on build time
* most functions are copied from makepkg
Diffstat (limited to 'archbuild.in')
-rw-r--r-- | archbuild.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/archbuild.in b/archbuild.in index 5b5ab21..e3e5f13 100644 --- a/archbuild.in +++ b/archbuild.in @@ -1,6 +1,9 @@ #!/bin/bash -base_packages=(base base-devel sudo) +m4_include(lib/common.sh) + +# FIXME: temporary added curl until pacman 4.0 moves to [core] +base_packages=(base base-devel sudo curl) cmd="${0##*/}" if [[ "${cmd%%-*}" == 'multilib' ]]; then @@ -31,16 +34,15 @@ while getopts 'cr:' arg; do done if [[ "$EUID" != '0' ]]; then - echo 'This script must be run as root.' - exit 1 + die 'This script must be run as root.' fi if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then - echo "Creating chroot for [${repo}] (${arch})..." + msg "Creating chroot for [${repo}] (${arch})..." for copy in "${chroots}/${repo}-${arch}"/*; do [[ -d $copy ]] || continue - echo "Deleting chroot copy '$(basename "${copy}")'..." + msg2 "Deleting chroot copy '$(basename "${copy}")'..." # Lock the copy exec 9>"${copy}.lock" @@ -71,5 +73,5 @@ else "${chroots}/${repo}-${arch}/root" fi -echo "Building in chroot for [${repo}] (${arch})..." +msg "Building in chroot for [${repo}] (${arch})..." setarch "${arch}" makechrootpkg -c -r "${chroots}/${repo}-${arch}" |