summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/librechroot12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index ee3ffb8..52a5e12 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -186,6 +186,10 @@ usage() {
by the by `CARCH` variable in the `/etc/makepkg.conf`
file inside of the chroot.'
echo
+ prose 'In line with this, The `-A CARCH` flag is simply an alias for'
+ printf ' -C "/usr/share/pacman/defaults/pacman.conf.$CARCH" \\\n'
+ printf ' -M "/usr/share/pacman/defaults/makepkg.conf.$CARCH"\n'
+ echo
prose 'Creating a copy, deleting a copy, or syncing a copy can be fairly
slow; but are very fast if $CHROOTDIR is on a btrfs partition.'
echo
@@ -195,6 +199,8 @@ usage() {
flag '-N' 'Disable networking in the chroot'
flag "-C <$(_ FILE)>" 'Copy this file to `$copydir/etc/pacman.conf`'
flag "-M <$(_ FILE)>" 'Copy this file to `$copydir/etc/makepkg.conf`'
+ flag "-A <$(_ CARCH)>" 'Set the architecture of the copy; simply an
+ alias for the `-C` and `-M` flags, see above.'
flag "-w <$(_ 'PATH[:PATH]')>" 'Bind mount a file or directory, read/write'
flag "-r <$(_ 'PATH[:PATH]')>" 'Bind mount a file or directory, read-only'
echo
@@ -230,12 +236,16 @@ main() {
[[ $COPY != root ]] || COPY=copy
local mode=enter
- while getopts 'n:l:NC:M:w:r:' opt; do
+ while getopts 'n:l:NC:M:A:w:r:' opt; do
case $opt in
n) CHROOT=$OPTARG;;
l) COPY=$OPTARG;;
N) sysd_nspawn_flags+=(--private-network);;
C|M) arch_nspawn_flags+=(-$opt "$OPTARG");;
+ A) arch_nspawn_flags+=(
+ -C "/usr/share/pacman/defaults/pacman.conf.$OPTARG"
+ -M "/usr/share/pacman/defaults/makepkg.conf.$OPTARG"
+ );;
w) sysd_nspawn_flags+=("--bind=$OPTARG");;
r) sysd_nspawn_flags+=("--bind-ro=$OPTARG");;
*) usage >&2; return 1;;