Commit b9474603 authored by Seblu's avatar Seblu
Browse files

archbuild: Add option to not call makechrootpkg

Use to update/recreate the root chroot of a repository without trying to build
a PKGBUILD.
This is targeting builder with low bandwidth.
parent 82240a68
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ fi
chroots='/var/lib/archbuild'
clean_first=false
update=true
build=true

usage() {
	echo "Usage: $cmd [options] -- [makechrootpkg args]"
@@ -26,6 +27,7 @@ usage() {
	echo '    -U         Do not update chroots before building'
	echo '    -r <dir>   Create chroots in this directory'
	echo '    -R         Repackage (fastpass to makepkg -R)'
	echo '    -n         Do not build (used to create/update the chroot)'
	echo ''
	echo "Default makechrootpkg args: ${makechrootpkg_args[*]}"
	echo ''
@@ -34,7 +36,7 @@ usage() {

orig_argv=("$@")

while getopts 'hcr:UR' arg; do
while getopts 'hcr:URn' arg; do
	case "${arg}" in
		c) clean_first=true ;;
		U) update=false
@@ -43,6 +45,7 @@ while getopts 'hcr:UR' arg; do
		R) update=false
		   clean_first=false
		   makechrootpkg_args=(-n -- -R -f);;
		n) build=false ;;
		*) usage ;;
	esac
done
@@ -86,5 +89,7 @@ elif $update; then
                pacman -Syu --noconfirm || abort
fi

if $build; then
	msg "Building in chroot for [${repo}] (${arch})..."
	exec makechrootpkg -r "${chroots}/${repo}-${arch}" "${makechrootpkg_args[@]}"
fi
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ _archbuild_args=(
	'-U[Do not update chroots before building]'
	'-R[Repackage; fastpass to makepkg -R]'
	'-r[Create chroots in this directory]:base_dir:_files -/'
	'-n[Do not build]'
)

_archco_args=(