浏览代码

Rename exit.sh module to exits.sh

Alois Mahdal 9 年前
父节点
当前提交
f8c294a0ff
共有 4 个文件被更改,包括 28 次插入28 次删除
  1. 1
    1
      include/core.sh
  2. 15
    15
      include/exits.sh
  3. 11
    11
      test/data/ffoo_api/functions.oracle
  4. 1
    1
      test/data/ffoo_api/modules.oracle

+ 1
- 1
include/core.sh 查看文件

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-ffoo import exit
3
+ffoo import exits
4 4
 ffoo import mkpretty
5 5
 
6 6
 

include/exit.sh → include/exits.sh 查看文件

@@ -1,18 +1,18 @@
1 1
 #!/bin/bash
2 2
 
3 3
 
4
-FFOO_EXIT_OK=0
5
-FFOO_EXIT_NO=1
6
-FFOO_EXIT_USAGE=2
7
-FFOO_EXIT_ERROR=3
8
-FFOO_EXIT_PANIC=4
4
+FFOO_EXITS_OK=0
5
+FFOO_EXITS_NO=1
6
+FFOO_EXITS_USAGE=2
7
+FFOO_EXITS_ERROR=3
8
+FFOO_EXITS_PANIC=4
9 9
 
10 10
 
11 11
 exit_ok() {
12 12
     #
13 13
     # Exit script with success
14 14
     #
15
-    exit $FFOO_EXIT_OK
15
+    exit $FFOO_EXITS_OK
16 16
 }
17 17
 
18 18
 
@@ -20,7 +20,7 @@ exit_no() {
20 20
     #
21 21
     # Exit script with answer "no"
22 22
     #
23
-    exit $FFOO_EXIT_NO
23
+    exit $FFOO_EXITS_NO
24 24
 }
25 25
 
26 26
 
@@ -28,7 +28,7 @@ exit_usage() {
28 28
     #
29 29
     # Exit script with usage error
30 30
     #
31
-    exit $FFOO_EXIT_USAGE
31
+    exit $FFOO_EXITS_USAGE
32 32
 }
33 33
 
34 34
 
@@ -36,7 +36,7 @@ exit_error() {
36 36
     #
37 37
     # Exit script with generic unexpected error
38 38
     #
39
-    exit $FFOO_EXIT_ERROR
39
+    exit $FFOO_EXITS_ERROR
40 40
 }
41 41
 
42 42
 
@@ -44,7 +44,7 @@ exit_panic() {
44 44
     #
45 45
     # Exit script in panic (e.g. assert failure, sure bug)
46 46
     #
47
-    exit $FFOO_EXIT_PANIC
47
+    exit $FFOO_EXITS_PANIC
48 48
 }
49 49
 
50 50
 
@@ -64,7 +64,7 @@ exits_ok() {
64 64
     #
65 65
     # Exit script with success
66 66
     #
67
-    exits $FFOO_EXIT_OK
67
+    exits $FFOO_EXITS_OK
68 68
 }
69 69
 
70 70
 
@@ -72,7 +72,7 @@ exits_no() {
72 72
     #
73 73
     # Exit script with answer "no"
74 74
     #
75
-    exits $FFOO_EXIT_NO
75
+    exits $FFOO_EXITS_NO
76 76
 }
77 77
 
78 78
 
@@ -80,7 +80,7 @@ exits_usage() {
80 80
     #
81 81
     # Exit script with usage error
82 82
     #
83
-    exits $FFOO_EXIT_USAGE
83
+    exits $FFOO_EXITS_USAGE
84 84
 }
85 85
 
86 86
 
@@ -88,7 +88,7 @@ exits_error() {
88 88
     #
89 89
     # Exit script with generic unexpected error
90 90
     #
91
-    exits $FFOO_EXIT_ERROR
91
+    exits $FFOO_EXITS_ERROR
92 92
 }
93 93
 
94 94
 
@@ -96,7 +96,7 @@ exits_panic() {
96 96
     #
97 97
     # Exit script in panic (e.g. assert failure, sure bug)
98 98
     #
99
-    exits $FFOO_EXIT_PANIC
99
+    exits $FFOO_EXITS_PANIC
100 100
 }
101 101
 
102 102
 

+ 11
- 11
test/data/ffoo_api/functions.oracle 查看文件

@@ -23,17 +23,17 @@ core.echos
23 23
 core.think
24 24
 core.usage_is
25 25
 core.warn
26
-exit.exit_assert
27
-exit.exit_error
28
-exit.exit_no
29
-exit.exit_ok
30
-exit.exit_usage
31
-exit.exits
32
-exit.exits_assert
33
-exit.exits_error
34
-exit.exits_no
35
-exit.exits_ok
36
-exit.exits_usage
26
+exits.exit_assert
27
+exits.exit_error
28
+exits.exit_no
29
+exits.exit_ok
30
+exits.exit_usage
31
+exits.exits
32
+exits.exits_assert
33
+exits.exits_error
34
+exits.exits_no
35
+exits.exits_ok
36
+exits.exits_usage
37 37
 misc.append_if_missing
38 38
 misc.collapse_tilde
39 39
 misc.echo_hr

+ 1
- 1
test/data/ffoo_api/modules.oracle 查看文件

@@ -1,7 +1,7 @@
1 1
 charmenu
2 2
 config
3 3
 core
4
-exit
4
+exits
5 5
 misc
6 6
 mkpretty
7 7
 mkpretty_color