From 703d43da1774f268df08d390a29855cfd6705ec2 Mon Sep 17 00:00:00 2001 From: Simo Leone Date: Tue, 9 Oct 2007 03:39:09 -0500 Subject: Made PKGDIR a command line parameter The package directory is now a command line param. Also beefed up checking for package file existence. Signed-off-by: Simo Leone --- mkarchiso | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mkarchiso') diff --git a/mkarchiso b/mkarchiso index 95dfdaf..a9d72b9 100755 --- a/mkarchiso +++ b/mkarchiso @@ -25,6 +25,7 @@ usage () echo " general options:" echo " -c CONFIG Use CONFIG file. default: /etc/archlive/mkarchiso.conf" echo " -i CPIO CONFIG Use CONFIG file for mkinitcpio. default: /etc/archlive/mkinitcpio.conf" + echo " -p PKGFILE DIR Look for package list files in DIR. default: ." echo " -f Force overwrite of working files / iso" echo " -v Verbose output. Default: no" echo " -h This message." @@ -36,10 +37,11 @@ usage () exit 1 } -while getopts 'c:i:fvh' arg; do +while getopts 'c:i:p:fvh' arg; do case "${arg}" in c) CONFIG="${OPTARG}" ;; i) CPIOCONFIG="${OPTARG}" ;; + p) PKGDIR="${OPTARG}" ;; f) FORCE="y" ;; v) QUIET="n" ;; h|?) usage ;; @@ -96,6 +98,9 @@ install_pkgfile () toinstall="${toinstall} ${pkg}" done < ${1} _pacman "${toinstall}" + else + echo "Package file '${1}' does not exist, aborting..." + exit 1 fi } @@ -130,7 +135,9 @@ if [ "${command_name}" = "install" -o "${command_name}" = "all" ]; then kernelver=$(_kversion) kernelsuffix=${kernelver##*-} echo "Kernel Version ${kernelver} (${kernelsuffix}) installed - installing modules..." - install_pkgfile "modules.${kernelsuffix}" + if [ -e "${PKGDIR}/${kernelsuffix}.modules" ]; then + install_pkgfile "${PKGDIR}/${kernelsuffix}.modules" + fi echo "Updating module dependancies" [ "${kernelsuffix}" = "ARCH" ] && kernelsuffix="" -- cgit v1.2.3-70-g09d2