Skip to content

Commit

Permalink
grml-info dialog: check for present HTML page and support $distri
Browse files Browse the repository at this point in the history
Thanks: Markus Ulrich for the bugreport
  • Loading branch information
mika committed May 9, 2012
1 parent 6129020 commit 5853306
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions quickconfig/025-info.sh
@@ -1,11 +1,26 @@
# grml-info module for grml-quickconfig
LINE='print_line "Show ^information about grml (/grml-info/)"'
if [ -n "$distri" ] ; then
LINE='print_line "Show ^information about $distri (/grml-info/)"'
else
LINE='print_line "Show ^information about Grml (/grml-info/)"'
fi

KEY=(i)
FUNCTION="run grml-info"

display_entry() {
if [ -n "$distri" ] ; then
page="/usr/share/doc/${distri}-docs/index.html"
else
page="/usr/share/doc/grml-docs/startpage.html"
fi

if [ -r "$page" ] ; then
return 0
else
return 1
fi
}

## END OF FILE #################################################################
# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=3
# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=2

0 comments on commit 5853306

Please sign in to comment.