瀏覽代碼

Add shellfu template

Alois Mahdal 8 年之前
父節點
當前提交
ff95c9f9f8
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13
    0
      bin/mkexec

+ 13
- 0
bin/mkexec 查看文件

@@ -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