Update 'kfg'
This commit is contained in:
10
kfg
10
kfg
@@ -6,8 +6,9 @@ VERSION="0.1"
|
|||||||
function show_help {
|
function show_help {
|
||||||
echo -en "Usage: $NAME [cmd] [ -y | --yes ] [ -h | --help ] [ -m | --arch ARCH-STRING ] [ -d | --debug ]\n"
|
echo -en "Usage: $NAME [cmd] [ -y | --yes ] [ -h | --help ] [ -m | --arch ARCH-STRING ] [ -d | --debug ]\n"
|
||||||
echo -en "Available commands:
|
echo -en "Available commands:
|
||||||
\tupdate\t\t update the tool
|
\tupdate\t\t Update the tool
|
||||||
\tinstall\t\t install configs :)
|
\tinstall\t\t Install configs :)
|
||||||
|
\tversion\t\t Print the version number
|
||||||
\n"
|
\n"
|
||||||
|
|
||||||
echo -en "Available options:
|
echo -en "Available options:
|
||||||
@@ -20,6 +21,10 @@ function show_help {
|
|||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function version {
|
||||||
|
echo "v$VERSION"
|
||||||
|
}
|
||||||
|
|
||||||
function log {
|
function log {
|
||||||
color $1 "[$2]"
|
color $1 "[$2]"
|
||||||
echo "$3"
|
echo "$3"
|
||||||
@@ -406,6 +411,7 @@ RC_FILE=".zshrc"
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
update) update ;;
|
update) update ;;
|
||||||
|
version) version ;;
|
||||||
install) install; shift ;;
|
install) install; shift ;;
|
||||||
# -- means the end of the arguments; drop this, and break out of the while loop
|
# -- means the end of the arguments; drop this, and break out of the while loop
|
||||||
--) shift; break ;;
|
--) shift; break ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user