Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grml-info dialog: check for present HTML page and support $distri
Thanks: Markus Ulrich for the bugreport
- Loading branch information
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |