This commit is contained in:
udeved 2017-04-19 01:09:57 +02:00
parent 6518825280
commit d2bb99ff1a
11 changed files with 23 additions and 13 deletions

View file

@ -48,6 +48,7 @@ usage() {
# exit $(( $# ? 0 : 1 ))
# fi
#
orig_argv=("$0" "$@")
opts=':C:cdGiM'

View file

@ -135,6 +135,8 @@ usage() {
exit $1
}
orig_argv=("$0" "$@")
opts='p:a:b:r:t:k:i:g:czxmvqh'
while getopts "${opts}" arg; do

View file

@ -103,6 +103,8 @@ usage() {
exit $1
}
orig_argv=("$0" "$@")
opts='p:a:b:r:i:cwnsuqh'
while getopts "${opts}" arg; do

View file

@ -55,6 +55,8 @@ usage() {
exit $1
}
orig_argv=("$0" "$@")
opts='sacqh'
while getopts "${opts}" arg; do

View file

@ -112,6 +112,8 @@ usage() {
exit $1
}
orig_argv=("$0" "$@")
opts='p:a:i:k:gcvqh'
while getopts "${opts}" arg; do

View file

@ -43,6 +43,8 @@ usage() {
exit 1
}
orig_argv=("$0" "$@")
opts='hKC:M:S:c:r:w:B:f:s'
while getopts ${opts} arg; do

View file

@ -55,6 +55,8 @@ usage() {
exit $1
}
orig_argv=("$0" "$@")
opts=':haq'
while getopts ${opts} arg; do

View file

@ -42,6 +42,8 @@ usage() {
exit 1
}
orig_argv=("$0" "$@")
opts='hLKC:M:S:c:B:f:s'
while getopts ${opts} arg; do

View file

@ -151,7 +151,7 @@ install_packages() {
pkgnames=("${install_pkgs[@]##*/}")
cp -- "${install_pkgs[@]}" "$copydir/root/"
chroot-run -r "${bindmounts_ro[@]}" -w "${bindmounts_rw[@]}" "$copydir" \
chroot-run -r "${bindmounts_ro[*]}" -w "${bindmounts_rw[*]}" "$copydir" \
pacman -U --noconfirm -- "${pkgnames[@]/#//root/}"
ret=$?
rm -- "${pkgnames[@]/#/$copydir/root/}"
@ -293,6 +293,8 @@ move_products() {
# }}}
orig_argv=("$0" "$@")
main() {
init_variables
@ -364,11 +366,8 @@ main() {
sync_chroot "$chrootdir" "$copy"
fi
$update_first && chroot-run \
-r "${bindmounts_ro[@]}" \
-w "${bindmounts_rw[@]}" \
"$copydir" \
pacman -Syu --noconfirm
$update_first && chroot-run -r "${bindmounts_ro[*]}" -w "${bindmounts_rw[*]}" "$copydir" \
pacman -Syu --noconfirm
if [[ -n ${install_pkgs[*]:-} ]]; then
install_packages "$copydir" "${install_pkgs[@]}"
@ -383,10 +382,8 @@ main() {
bindmounts_rw=("${PWD}:/startdir" "${SRCDEST}:/srcdest")
if chroot-run -r "${bindmounts_ro[@]}" \
-w "${bindmounts_rw[@]}" \
"$copydir" \
/chrootbuild "${makepkg_args[@]}"; then
if chroot-run -r "${bindmounts_ro[*]}" -w "${bindmounts_rw[*]}" "$copydir" \
/chrootbuild "${makepkg_args[@]}"; then
move_products "$copydir" "$src_owner"
else
(( ret += 1 ))

View file

@ -65,7 +65,7 @@ error() {
stat_busy() {
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" >&2
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}...${ALL_OFF}" "$@" >&2
}
stat_done() {

View file

@ -760,8 +760,6 @@ run(){
fi
}
orig_argv=("$0" "$@")
check_root() {
(( EUID == 0 )) && return
if type -P sudo >/dev/null; then