[Xfce4-commits] <xfce-utils:master> Fix xfhelp4 for the new documentation locations.
Nick Schermer
noreply at xfce.org
Sat Aug 28 16:14:02 CEST 2010
Updating branch refs/heads/master
to 3da422a7f4cdc233c20ffd754744aa9708c1efd4 (commit)
from 9f3173f279291d53af8ba0b383db0f2a1fd3a279 (commit)
commit 3da422a7f4cdc233c20ffd754744aa9708c1efd4
Author: Nick Schermer <nick at xfce.org>
Date: Sat Aug 28 15:31:40 2010 +0200
Fix xfhelp4 for the new documentation locations.
scripts/xfhelp4.in | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/scripts/xfhelp4.in b/scripts/xfhelp4.in
index 1b3b3fa..57fe9a0 100644
--- a/scripts/xfhelp4.in
+++ b/scripts/xfhelp4.in
@@ -23,13 +23,13 @@
HELP_DIR="@_datadir_@/doc"
if [ ! x"$1" = x"" ]; then
- HELP_FILE="$1"
+ MODULE="${1%.html}"
else
- HELP_FILE="index.html"
+ MODULE="xfce-utils"
fi
# Check for translated documentation
-if [ -n "$LC_ALL" ] ; then
+if [ -n "$LC_ALL" ] ; then
LC=$LC_ALL
elif [ -n "$LANG" ] ; then
LC=$LANG
@@ -37,17 +37,19 @@ else
LC="C"
fi
-if [ -r "$HELP_DIR/$LC/$HELP_FILE" ]
+LC_CLEAN="`echo $LC | sed 's/\(..\)_.*/\1/'`"
+
+if [ -r "$HELP_DIR/$MODULE/html/$LC/index.html" ]
then
- URL="$HELP_DIR/$LC/$HELP_FILE"
-elif [ -r "$HELP_DIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELP_FILE" ]
+ URL="$HELP_DIR/$MODULE/html/$LC/index.html"
+elif [ -r "$HELP_DIR/$MODULE/html/$LC_CLEAN/index.html" ]
then
- URL="$HELP_DIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELP_FILE"
-elif [ -r "$HELP_DIR/C/$HELP_FILE" ]
+ URL="$HELP_DIR/$MODULE/html/$LC_CLEAN/index.html"
+elif [ -r "$HELP_DIR/$MODULE/html/C/index.html" ]
then
- URL="$HELP_DIR/C/$HELP_FILE"
-else
- URL="$HELP_DIR/C/index.html"
+ URL="$HELP_DIR/$MODULE/html/C/index.html"
+else
+ URL="$HELP_DIR/xfce-utils/html/C/index.html"
fi
xfbrowser4 $URL
More information about the Xfce4-commits
mailing list