index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2016-04-30 21:49:38 +0200 |
---|---|---|
committer | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2016-05-28 12:30:36 +0200 |
commit | 69a3a0e7c02ae754a01dd3139e9363604760d5e1 (patch) | |
tree | a3f57ab5b375e3793318b1ff3b62075ca9a7f4ee /makechrootpkg.in | |
parent | ca819a23579114f57476a609314efbe7d1bf2aea (diff) |
-rw-r--r-- | makechrootpkg.in | 19 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index 9534c54..709e824 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -127,19 +127,16 @@ clean_temporary() { } install_packages() { - local pkgname + local -a pkgnames + local ret - for install_pkg in "${install_pkgs[@]}"; do - pkgname="${install_pkg##*/}" - cp "$install_pkg" "$copydir/$pkgname" + pkgnames=("${install_pkgs[@]##*/}") - arch-nspawn "$copydir" \ - "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ - pacman -U /$pkgname --noconfirm - (( ret += !! $? )) - - rm "$copydir/$pkgname" - done + cp -- "${install_pkgs[@]}" "$copydir/root/" + arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \ + pacman -U --noconfirm -- "${pkgnames[@]/#//root/}" + ret=$? + rm -- "${pkgnames[@]/#/$copydir/root/}" # If there is no PKGBUILD we are done [[ -f PKGBUILD ]] || exit $ret |