#!/bin/bash # 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. [[ ! -f PKGBUILD ]] && echo 'No PKGBUILD' && exit 1 source /etc/makepkg.conf source PKGBUILD repo=${0##*/} repo=${repo%-*} # 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 amd64 build and any builds if in_array 'x86_64' "${arch[@]}" || in_array 'any' "${arch[@]}"; then $repo-x86_64-build "$@" || exit 1 fi # vim:set ts=2 sw=2 ft=sh noet ai: