Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-30 21:40:45 +0100
committerErich Eckner <git@eckner.net>2017-10-30 21:40:45 +0100
commit35f9fe2b74fea6b35baf563b1403ac5bba11c889 (patch)
treefb73d223d8030bf61f52144fd698b9fc22c2dc4f /makechrootpkg.in
parent46885845319eb714c815ac274e0aa5c03b49e5ad (diff)
parente4db687d108d7e7cd32654b9c8eed4c7c12cb094 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in44
1 files changed, 20 insertions, 24 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 6d17d0d..d136f6c 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -15,29 +15,6 @@ m4_include(lib/archroot.sh)
shopt -s nullglob
-init_variables() {
- default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
- makepkg_args=("${default_makepkg_args[@]}")
- keepbuilddir=false
- update_first=false
- clean_first=false
- run_namcap=false
- temp_chroot=false
- chrootdir=
- passeddir=
- makepkg_user=
- declare -ga install_pkgs
- declare -gi ret=0
-
- bindmounts_ro=()
- bindmounts_rw=()
-
- copy=$USER
- [[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
- [[ -z "$copy" || $copy = root ]] && copy=copy
- src_owner=${SUDO_USER:-$USER}
-}
-
usage() {
echo "Usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]"
echo ' Run this script in a PKGBUILD dir to build a package inside a'
@@ -325,7 +302,26 @@ move_products() {
# }}}
main() {
- init_variables
+ default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
+ makepkg_args=("${default_makepkg_args[@]}")
+ keepbuilddir=false
+ update_first=false
+ clean_first=false
+ run_namcap=false
+ temp_chroot=false
+ chrootdir=
+ passeddir=
+ makepkg_user=
+ declare -a install_pkgs
+ declare -i ret=0
+
+ bindmounts_ro=()
+ bindmounts_rw=()
+
+ copy=$USER
+ [[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
+ [[ -z "$copy" || $copy = root ]] && copy=copy
+ src_owner=${SUDO_USER:-$USER}
while getopts 'hcur:I:l:nTD:d:U:' arg; do
case "$arg" in