summaryrefslogtreecommitdiff
path: root/mkarchroot
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-01-24 16:52:54 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2009-01-24 16:52:54 -0600
commit9dd60741bddfb9cd61d6665bffd2d1ea9b99513b (patch)
tree7489188a928dd3ac26918bbc82d51af5bb55f461 /mkarchroot
parent1b178621a5fc1ec088c27fd419458d93d80aeb0f (diff)
downloaddevtools-9dd60741bddfb9cd61d6665bffd2d1ea9b99513b.tar.xz
Add a param to NOT copy config files to the chroot
This is primarilly needed for archiso creation, but could be useful elsewhere. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'mkarchroot')
-rwxr-xr-xmkarchroot7
1 files changed, 5 insertions, 2 deletions
diff --git a/mkarchroot b/mkarchroot
index 099083d..b20e5a4 100755
--- a/mkarchroot
+++ b/mkarchroot
@@ -10,6 +10,7 @@
FORCE="n"
RUN=""
+NOCOPY="n"
working_dir=""
@@ -25,6 +26,7 @@ usage ()
echo " -f Force overwrite of files in the working-dir"
echo " -C <file> location of a pacman config file"
echo " -M <file> location of a makepkg config file"
+ echo " -n do not copy config files into the chroot"
echo " -h This message"
exit $1
}
@@ -36,6 +38,7 @@ while getopts 'r:ufhC:M:' arg; do
f) FORCE="y" ;;
C) pac_conf="$OPTARG" ;;
M) makepkg_conf="$OPTARG" ;;
+ n) NOCOPY="y" ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@@ -161,12 +164,12 @@ else
ldconfig -r "${working_dir}"
fi
- if [ "$pac_conf" != "" ]; then
+ if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then
echo "installing custom pacman.conf"
cp ${pac_conf} ${working_dir}/etc/pacman.conf
fi
- if [ "$makepkg_conf" != "" ]; then
+ if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then
echo "installing custom makepkg.conf"
cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf
fi