GitHubのミラーです
https://github.com/hayao0819/crshini
Révision | 010e1d50bfc6e4f47c80ef2ae9744875f1509d22 (tree) |
---|---|
l'heure | 2021-06-08 20:01:36 |
Auteur | hayao <hayao@fasc...> |
Commiter | hayao |
[update] : Added --del
@@ -48,7 +48,7 @@ done | ||
48 | 48 | # Parse options |
49 | 49 | ARGUMENT=("${@}") |
50 | 50 | OPTS=("h") |
51 | -OPTL=("get" "set" "merge" "help" "version" "output:" "stdin") | |
51 | +OPTL=("get" "set" "merge" "del" "help" "version" "output:" "stdin") | |
52 | 52 | if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}"); then |
53 | 53 | exit 1 |
54 | 54 | fi |
@@ -70,6 +70,10 @@ while true; do | ||
70 | 70 | mode="merge" |
71 | 71 | shift 1 |
72 | 72 | ;; |
73 | + --del) | |
74 | + mode="del" | |
75 | + shift 1 | |
76 | + ;; | |
73 | 77 | -h | --help) |
74 | 78 | _usage |
75 | 79 | exit 1 |
@@ -115,4 +119,7 @@ case "${mode}" in | ||
115 | 119 | "merge") |
116 | 120 | _crshini_output="${output}" _crshini_stdin=true _crshini_merge "${file}" "${section}" |
117 | 121 | ;; |
122 | + "del") | |
123 | + _crshini_output="${output}" _crshini_stdin="${stdin}" _crshini_del "${file}" "${section}" "${param}" | |
124 | + ;; | |
118 | 125 | esac |