Newer
Older
# Copyright © Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#chroot='/var/tmp/chroots'
#chroot_32="$chroot/seblu-i686"
#chroot_64="$chroot/seblu-x86_64"
[[ ! -f PKGBUILD ]] && echo 'No PKGBUILD' && exit 1
source /etc/makepkg.conf
source PKGBUILD
# usage : in_array( $needle, $haystack )
# return : 0 - found
# 1 - not found
in_array() {
local needle=$1; shift
local item
for item in "$@"; do
[[ $item = $needle ]] && return 0 # Found
done
return 1 # Not Found
}
# arch x86 and any builds
if in_array 'i686' "${arch[@]}" || in_array 'any' "${arch[@]}"; then
#linux32 makechrootpkg -c -r "$chroot_32" || exit 1
seblu-i686-build
fi
# arch amd64 build
if in_array 'x86_64' "${arch[@]}"; then
#linux64 makechrootpkg -c -r "$chroot_64" || exit 1
seblu-x86_64-build
fi
# vim:set ts=2 sw=2 ft=sh noet: