summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-01-12 00:30:45 +0100
committerThomas Bächler <thomas@archlinux.org>2010-01-12 00:30:45 +0100
commit5e162607a486675b51febbcacc81b62356e0ab29 (patch)
treeeed3735a94644f5cb1f41a9af055561326330333
parente05d778524f31d1af53f3647385978acde130334 (diff)
downloadmkinitcpio-5e162607a486675b51febbcacc81b62356e0ab29.tar.gz
mkinitcpio-5e162607a486675b51febbcacc81b62356e0ab29.tar.xz
Do not append a trailing /, remove it (fixed FS#17793)
The comment said it was appending a trailing /, but it was actually removed Recent fixes adjusted the code to do what the comment says, which is wrong here. This fixes the code and the comment.
-rwxr-xr-xmkinitcpio6
1 files changed, 2 insertions, 4 deletions
diff --git a/mkinitcpio b/mkinitcpio
index e331da2..91dac25 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -175,10 +175,8 @@ if [ -n "${PRESET}" ]; then
fi
fi
-# append a trailing / if needed
-if [ "${BASEDIR}" = "${BASEDIR%/}" ]; then
- BASEDIR="${BASEDIR}/"
-fi
+# remove trailing / from BASEDIR
+BASEDIR="${BASEDIR%/}"
MODULEDIR="${BASEDIR}/lib/modules/${KERNELVERSION}"