forked from mirrored-repos/manjaro-tools
chroot-run: remove commented code
mkchrootpkg: update help
This commit is contained in:
parent
d2bb99ff1a
commit
c6bd1d3a5e
2 changed files with 14 additions and 20 deletions
|
@ -36,7 +36,7 @@ usage() {
|
|||
echo ' -s Do not run setarch'
|
||||
echo ' -r <list> Bind mountargs ro'
|
||||
echo ' -w <list> Bind mountargs rw'
|
||||
echo ' List format [src1:target1,...,srcN:targetN]'
|
||||
echo ' List format [src1:target1 ... srcN:targetN]'
|
||||
echo ' -B Use custom build mirror'
|
||||
echo ' -K Keep mirrorlist (-B)'
|
||||
echo ' -h This message'
|
||||
|
@ -116,21 +116,13 @@ chroot_extra_mount() {
|
|||
chroot_mount "$cache_dir" "$1${cache_dir}" -Br
|
||||
done
|
||||
|
||||
# if [[ -n ${bindmounts_ro[@]} ]];then
|
||||
# local IFS=','
|
||||
for m in ${bindmounts_ro[@]}; do
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -Br
|
||||
done
|
||||
# unset IFS
|
||||
# fi
|
||||
for m in ${bindmounts_ro[@]}; do
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -Br
|
||||
done
|
||||
|
||||
# if [[ -n ${bindmounts_rw[@]} ]];then
|
||||
# local IFS=','
|
||||
for m in ${bindmounts_rw[@]}; do
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -B
|
||||
done
|
||||
# unset IFS
|
||||
# fi
|
||||
for m in ${bindmounts_rw[@]}; do
|
||||
chroot_mount "${m%%:*}" "$1${m##*:}" -B
|
||||
done
|
||||
}
|
||||
|
||||
umask 0022
|
||||
|
|
|
@ -292,17 +292,18 @@ move_products() {
|
|||
}
|
||||
# }}}
|
||||
|
||||
|
||||
orig_argv=("$0" "$@")
|
||||
|
||||
main() {
|
||||
init_variables
|
||||
|
||||
while getopts 'hcur:I:l:nTD:d:U:' arg; do
|
||||
local opts='hcur:I:l:nTD:d:U:'
|
||||
|
||||
while getopts ${opts} arg; do
|
||||
case "$arg" in
|
||||
c) clean_first=true ;;
|
||||
D) bindmounts_ro+=(--bind-ro="$OPTARG") ;;
|
||||
d) bindmounts_rw+=(--bind="$OPTARG") ;;
|
||||
D) bindmounts_ro+=("$OPTARG") ;;
|
||||
d) bindmounts_rw+=("$OPTARG") ;;
|
||||
u) update_first=true ;;
|
||||
r) passeddir="$OPTARG" ;;
|
||||
I) install_pkgs+=("$OPTARG") ;;
|
||||
|
@ -351,7 +352,8 @@ main() {
|
|||
|
||||
umask 0022
|
||||
|
||||
load_vars "$USER_HOME/.makepkg.conf" || load_vars /etc/makepkg.conf
|
||||
load_vars "${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
|
||||
load_vars /etc/makepkg.conf
|
||||
|
||||
# Use PKGBUILD directory if these don't exist
|
||||
[[ -d $PKGDEST ]] || PKGDEST=$PWD
|
||||
|
|
Loading…
Reference in a new issue