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>
This commit is contained in:
parent
1b178621a5
commit
9dd60741bd
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
FORCE="n"
|
FORCE="n"
|
||||||
RUN=""
|
RUN=""
|
||||||
|
NOCOPY="n"
|
||||||
|
|
||||||
working_dir=""
|
working_dir=""
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@ usage ()
|
||||||
echo " -f Force overwrite of files in the working-dir"
|
echo " -f Force overwrite of files in the working-dir"
|
||||||
echo " -C <file> location of a pacman config file"
|
echo " -C <file> location of a pacman config file"
|
||||||
echo " -M <file> location of a makepkg 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"
|
echo " -h This message"
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +38,7 @@ while getopts 'r:ufhC:M:' arg; do
|
||||||
f) FORCE="y" ;;
|
f) FORCE="y" ;;
|
||||||
C) pac_conf="$OPTARG" ;;
|
C) pac_conf="$OPTARG" ;;
|
||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
|
n) NOCOPY="y" ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -161,12 +164,12 @@ else
|
||||||
ldconfig -r "${working_dir}"
|
ldconfig -r "${working_dir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$pac_conf" != "" ]; then
|
if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then
|
||||||
echo "installing custom pacman.conf"
|
echo "installing custom pacman.conf"
|
||||||
cp ${pac_conf} ${working_dir}/etc/pacman.conf
|
cp ${pac_conf} ${working_dir}/etc/pacman.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$makepkg_conf" != "" ]; then
|
if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then
|
||||||
echo "installing custom makepkg.conf"
|
echo "installing custom makepkg.conf"
|
||||||
cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf
|
cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue