pkgname=which
pkgver=0.1
pkgrel=1
arch=('any')
depends=(bash)
license=('unknown')
source=()
package() {
mkdir -p "$pkgdir"/usr/bin
cat > "$pkgdir"/usr/bin/which << "EOF"
#!/bin/bash
type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
EOF
chmod -v 755 "$pkgdir"/usr/bin/which
}