Browse Source

Add shellfu template

Alois Mahdal 8 years ago
parent
commit
ff95c9f9f8
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      bin/mkexec

+ 13
- 0
bin/mkexec View File

@@ -66,6 +66,19 @@ my $templates = {
66 66
         'ffoo'  => "\n. \"\$(ffoom path)\" || exit 3\n\n"
67 67
                    . "ffoo import pretty\n\n"
68 68
                    . "FFOO_DEBUG=true",
69
+        'shellfu'  => "\n. \"\$(shellfu-get path)\" || exit 3\n\n"
70
+                   . "shellfu import pretty\n\n"
71
+                   . "SHELLFU_DEBUG=\${SHELLFU_DEBUG:-true}\n\n"
72
+                   . "usage() {\n"
73
+                   . "    mkusage \"arg...\"\n"
74
+                   . "}\n\n"
75
+                   . "main() {\n"
76
+                   . "    while true; do case \$1 in\n"
77
+                   . "        -*) usage ;;\n"
78
+                   . "        *)  break ;;\n"
79
+                   . "    esac done\n"
80
+                   . "}\n\n"
81
+                   . "main \"@\"",
69 82
     },
70 83
 };
71 84