summaryrefslogtreecommitdiff
path: root/mkarchiso
diff options
context:
space:
mode:
authorSimo Leone <simo@archlinux.org>2007-10-09 03:39:09 -0500
committerDan McGee <dpmcgee@gmail.com>2007-10-09 20:59:27 -0500
commit703d43da1774f268df08d390a29855cfd6705ec2 (patch)
treeeeca19835f42f3038526cfdf476c4e8ade86d7cd /mkarchiso
parent521c66d8925b226d2af96dd14ebcb2eb013965e6 (diff)
downloadarchiso32-703d43da1774f268df08d390a29855cfd6705ec2.tar.xz
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 <simo@archlinux.org>
Diffstat (limited to 'mkarchiso')
-rwxr-xr-xmkarchiso11
1 files changed, 9 insertions, 2 deletions
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=""