diff --git a/archbuild.in b/archbuild.in
index 2f8fcea55b98af25aad98a505e40af4cb0090879..a3ca8c3b0701787aab4cb00bb43c1f71d4938641 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -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
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
-msg "Building in chroot for [${repo}] (${arch})..."
-exec makechrootpkg -r "${chroots}/${repo}-${arch}" "${makechrootpkg_args[@]}"
+if $build; then
+ msg "Building in chroot for [${repo}] (${arch})..."
+ exec makechrootpkg -r "${chroots}/${repo}-${arch}" "${makechrootpkg_args[@]}"
+fi
diff --git a/zsh_completion.in b/zsh_completion.in
index ac8f3bb9423eb090a546fc523d7785ae62f88580..a2165864897c781a8e8e0738740050d008548cb8 100644
--- a/zsh_completion.in
+++ b/zsh_completion.in
@@ -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=(