Compare commits
No commits in common. "d99860148b4bb5d47d48794f55c9fdd6ecba8b95" and "54647e5c198fe97d6863b9288c49d9d827d5f8a8" have entirely different histories.
d99860148b
...
54647e5c19
@ -20,7 +20,7 @@ foreach($dirs as $dir){
|
|||||||
$code = str_replace("{{ COMMANDS }}", implode("\n", $codes), $base);
|
$code = str_replace("{{ COMMANDS }}", implode("\n", $codes), $base);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$file = __DIR__.'/wx.tmp';
|
$file = __DIR__.'/wx';
|
||||||
$file = fopen($file, "w");
|
$file = fopen($file, "w");
|
||||||
fwrite($file, $code);
|
fwrite($file, $code);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
@ -24,7 +24,6 @@ warencli-syntax-line-douple
|
|||||||
}
|
}
|
||||||
|
|
||||||
warencli-stop () {
|
warencli-stop () {
|
||||||
echo " "
|
|
||||||
echo " "
|
echo " "
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -32,9 +31,7 @@ warencli-stop () {
|
|||||||
warencli-update() {
|
warencli-update() {
|
||||||
if [[ -d "./src" ]]; then
|
if [[ -d "./src" ]]; then
|
||||||
echo ">>> Building... <<<"
|
echo ">>> Building... <<<"
|
||||||
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null
|
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php
|
||||||
mv wx.tmp wx
|
|
||||||
chmod +x wx
|
|
||||||
else
|
else
|
||||||
echo ">>> Updating... <<<"
|
echo ">>> Updating... <<<"
|
||||||
sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
|
sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
|
||||||
@ -45,6 +42,8 @@ else
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{ COMMANDS }}
|
||||||
|
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
|
|
||||||
warencli-start
|
warencli-start
|
||||||
|
57
wx
57
wx
@ -24,7 +24,6 @@ warencli-syntax-line-douple
|
|||||||
}
|
}
|
||||||
|
|
||||||
warencli-stop () {
|
warencli-stop () {
|
||||||
echo " "
|
|
||||||
echo " "
|
echo " "
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -32,9 +31,7 @@ warencli-stop () {
|
|||||||
warencli-update() {
|
warencli-update() {
|
||||||
if [[ -d "./src" ]]; then
|
if [[ -d "./src" ]]; then
|
||||||
echo ">>> Building... <<<"
|
echo ">>> Building... <<<"
|
||||||
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php &> /dev/null
|
podman run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp docker.io/library/php:8-cli php generator.php
|
||||||
mv wx.tmp wx
|
|
||||||
chmod +x wx
|
|
||||||
else
|
else
|
||||||
echo ">>> Updating... <<<"
|
echo ">>> Updating... <<<"
|
||||||
sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
|
sudo curl https://git.waren.io/warengroup/wx/raw/branch/master/wx -o /opt/wx &> /dev/null
|
||||||
@ -45,6 +42,58 @@ else
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
warencli-install() {
|
||||||
|
echo ">>> Install";
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-settings() {
|
||||||
|
echo ">>> Settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-ssh() {
|
||||||
|
echo ">>> SSH";
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-login() {
|
||||||
|
echo ">>> Authentication: Login";
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-logout() {
|
||||||
|
echo ">>> Authentication: Logout";
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-ssh-config(){
|
||||||
|
echo ">>> SSH: Config"
|
||||||
|
}
|
||||||
|
|
||||||
|
warencli-ssh-sign(){
|
||||||
|
echo ">>> SSH: Certificates"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
|
|
||||||
warencli-start
|
warencli-start
|
||||||
|
Loading…
Reference in New Issue
Block a user