Compare commits

...

1 Commits

Author SHA1 Message Date
Brijesh Krishna
e8aaa29d9a
Update pacstrap.in
Bypass file conflict checks and overwrite conflicting files. If the package that is about to be installed contains files that are already installed this option will cause all those files to be overwritten.
2023-06-16 19:39:39 +05:30

View File

@ -18,6 +18,7 @@ pacman_args=()
pacmode=-Sy
unshare=0
copyconf=0
overwrite=0
pacman_config=/etc/pacman.conf
m4_include(common)
@ -37,7 +38,7 @@ usage: ${0##*/} [options] root [packages...]
-N Run in unshare mode as a regular user
-P Copy the host's pacman config to the target
-U Use pacman -U to install packages
-O Bypass file conflict checks and overwrite conflicting files
-h Print this help message
pacstrap installs packages to the specified new root directory. If no packages
@ -122,6 +123,9 @@ while getopts ':C:cDGiKMNPU' flag; do
U)
pacmode=-U
;;
O)
overwrite=1
;;
:)
die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG"
;;
@ -148,6 +152,10 @@ if (( ! interactive )); then
pacman_args+=(--noconfirm)
fi
if (( overwite )); then
pacman_args+=(--overwrite='!*')
fi
if (( unshare )); then
setup=unshare_setup
$mount_unshare bash -c "$(declare_all); pacstrap"