Add more filetype support. - gopher-lawn - The gopher lawn gopher directory pro… | |
git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhf… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
commit 80a5e9f6b263f8c9802600c0bc6cf11e2f34d7d4 | |
parent 5dc5fccad94a7b9c5c9fb48d1f52003d5b8833ef | |
Author: Christoph Lohmann <[email protected]> | |
Date: Sat, 12 Aug 2023 18:44:19 +0200 | |
Add more filetype support. | |
Diffstat: | |
M mk-pearls | 32 ++++++++++++++++++++++++++---… | |
1 file changed, 27 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/mk-pearls b/mk-pearls | |
@@ -13,10 +13,30 @@ | |
| cut -d':' -f2- | xargs)" | |
case "${line}" in | |
Type:*) | |
- if [ "${fieldval}" != "text" ]; | |
- then | |
- break; | |
- fi | |
+ gtype="9" | |
+ case "${fieldval}" in | |
+ link) | |
+ gtype="1" | |
+ ;; | |
+ text) | |
+ gtype="0" | |
+ ;; | |
+ cso) | |
+ gtype="2" | |
+ ;; | |
+ error) | |
+ gtype="3" | |
+ ;; | |
+ uuencoded) | |
+ gtype="6" | |
+ ;; | |
+ search) | |
+ gtype="7" | |
+ ;; | |
+ telnet) | |
+ gtype="8" | |
+ ;; | |
+ esac | |
;; | |
Selector:*) | |
selector="${fieldval}" | |
@@ -37,9 +57,11 @@ | |
if [ -n "${selector}" ] \ | |
&& [ -n "${host}" ] \ | |
&& [ -n "${port}" ] \ | |
+ && [ -n "${gtype}" ] \ | |
&& [ -n "${linkname}" ]; | |
then | |
- printf "[0| (_) %s|%s|%s|%s]\n" \ | |
+ printf "[%s| (_) %s|%s|%s|%s]\n" \ | |
+ "$gtype" \ | |
"${linkname}" \ | |
"${selector}" \ | |
"${host}" \ |