Source Update
This commit is contained in:
parent
66bd5a965a
commit
d0c8f026f9
50
src/base.sh
Normal file
50
src/base.sh
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! "$BASH_VERSION" ] ; then
|
||||
bash $0 $1 $2 $3 $4 $5 $6 $7 $8 $9
|
||||
exit 1
|
||||
fi
|
||||
|
||||
warencli-syntax-line-douple() {
|
||||
echo -n "
|
||||
==============================
|
||||
"
|
||||
}
|
||||
|
||||
warencli-syntax-line-single() {
|
||||
echo -n "
|
||||
------------------------------
|
||||
"
|
||||
}
|
||||
|
||||
warencli-start() {
|
||||
warencli-syntax-line-douple
|
||||
echo -n "Warén CLI "
|
||||
warencli-syntax-line-douple
|
||||
}
|
||||
|
||||
warencli-stop () {
|
||||
echo " "
|
||||
echo " "
|
||||
exit 1
|
||||
}
|
||||
|
||||
warencli-update() {
|
||||
if [[ -d "./src" ]]; then
|
||||
echo ">>> Building... <<<"
|
||||
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php
|
||||
else
|
||||
cd /opt/wx
|
||||
curl
|
||||
fi
|
||||
}
|
||||
|
||||
{{ COMMANDS }}
|
||||
|
||||
COMMAND=$1
|
||||
|
||||
warencli-start
|
||||
if [[ ! -z $1 ]]; then
|
||||
warencli-$1 $2 $3 $4 $5 $6 $7 $8 $9
|
||||
fi
|
||||
warencli-stop
|
3
src/commands/auth/login.sh
Normal file
3
src/commands/auth/login.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-login() {
|
||||
echo ">>> Authentication: Login";
|
||||
}
|
3
src/commands/auth/logout.sh
Normal file
3
src/commands/auth/logout.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-logout() {
|
||||
echo ">>> Authentication: Logout";
|
||||
}
|
22
src/commands/help.sh
Normal file
22
src/commands/help.sh
Normal file
@ -0,0 +1,22 @@
|
||||
warencli-help() {
|
||||
echo "
|
||||
Usage: $0 COMMAND [OPTIONS]
|
||||
|
||||
Common Commands:
|
||||
ssh SSH
|
||||
config Config
|
||||
sign Certificates
|
||||
|
||||
Authentication Commands:
|
||||
login Login
|
||||
logout Logout
|
||||
|
||||
Management Commands:
|
||||
settings Settings
|
||||
|
||||
Maintenance Commands:
|
||||
install Install
|
||||
update Update
|
||||
";
|
||||
}
|
||||
|
3
src/commands/install.sh
Normal file
3
src/commands/install.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-install() {
|
||||
echo ">>> Install";
|
||||
}
|
3
src/commands/settings.sh
Normal file
3
src/commands/settings.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-settings() {
|
||||
echo ">>> Settings";
|
||||
}
|
3
src/commands/ssh.sh
Normal file
3
src/commands/ssh.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-ssh() {
|
||||
echo ">>> SSH";
|
||||
}
|
3
src/commands/ssh/config.sh
Normal file
3
src/commands/ssh/config.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-ssh-config(){
|
||||
echo ">>> SSH: Config"
|
||||
}
|
3
src/commands/ssh/sign.sh
Normal file
3
src/commands/ssh/sign.sh
Normal file
@ -0,0 +1,3 @@
|
||||
warencli-ssh-sign(){
|
||||
echo ">>> SSH: Certificates"
|
||||
}
|
Loading…
Reference in New Issue
Block a user