Skip to content

Commit 98d1fc9

Browse files
Create the main script
1 parent cbfa702 commit 98d1fc9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

bin/bash-utils

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
3+
#: TITLE: bash-utils
4+
#: DATE: 2019-07-16
5+
#: VERSION: 0.1.0
6+
#: AUTHOR: "Alex Y" <aleksandryackovlev@yandex.ru>
7+
#: DESCRIPTION: Bash utils
8+
9+
source bash-utils-env
10+
source bash-utils-config
11+
source bash-utils-input
12+
source bash-utils-output
13+
source bash-utils-help
14+
source bash-utils-utils
15+
source bash-utils-validate
16+
17+
commandToExec=$1
18+
shift
19+
20+
case $commandToExec in
21+
env)
22+
bash-utils-env "$@"
23+
;;
24+
config)
25+
bash-utils-config "$@"
26+
;;
27+
input)
28+
bash-utils-input "$@"
29+
;;
30+
output)
31+
bash-utils-output "$@"
32+
;;
33+
help)
34+
bash-utils-help "$@"
35+
;;
36+
utils)
37+
bash-utils-utils "$@"
38+
;;
39+
validate)
40+
bash-utils-validate "$@"
41+
;;
42+
*)
43+
bash-utils-utils die "$(bash-utils-env misuseErrorCode)" "An unknown command ""$commandToExec"
44+
;;
45+
esac

0 commit comments

Comments
 (0)