summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkinitcpio6
1 files changed, 4 insertions, 2 deletions
diff --git a/mkinitcpio b/mkinitcpio
index b55648a..c22cc2d 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -87,8 +87,7 @@ MODULEDIR="${BASEDIR}/lib/modules/${KERNELVERSION}"
if [ "x${BASEDIR}" != "x" ]; then
if [ "${BASEDIR:0:1}" != "/" ]; then
- echo "base directory '${BASEDIR}' must be an absolute path"
- exit 1
+ BASEDIR="$(pwd)/${BASEDIR}"
elif [ ! -d "${BASEDIR}" ]; then
echo "base directory '${BASEDIR}' does not exist or is not a directory"
exit 1
@@ -116,6 +115,9 @@ else
touch "${FILELIST}"
fi
+BASEDIR=$(echo ${BASEDIR} | tr -s /)
+MODULEDIR=$(echo ${MODULEDIR} | tr -s /)
+
source "${FUNCTIONS}"
if [ "${SHOW_AUTOMODS}" = "y" ]; then