Update
This commit is contained in:
parent
ef2bd340ae
commit
99379f11dd
10 changed files with 76 additions and 68 deletions
|
@ -2,34 +2,34 @@
|
|||
|
||||
set -e
|
||||
|
||||
function octoapp_message(){
|
||||
function octoapp_companion_message(){
|
||||
top_line
|
||||
title 'OctoApp Companion' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
echo -e " │ ${cyan}Control your Creality printer from your phone and ${white}│"
|
||||
echo -e " │ ${cyan}get notifications for your print! ${white}│"
|
||||
echo -e " │ ${cyan}OctoApp Companion allows you to control your printer from ${white}│"
|
||||
echo -e " │ ${cyan}OctoApp and get notifications for your prints. ${white}│"
|
||||
hr
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function install_octoapp(){
|
||||
octoapp_message
|
||||
function install_octoapp_companion(){
|
||||
octoapp_companion_message
|
||||
local yn
|
||||
while true; do
|
||||
install_msg "OctoApp Companion" yn
|
||||
case "${yn}" in
|
||||
Y|y)
|
||||
echo -e "${white}"
|
||||
if [ -d "$OCTOAPP_FOLDER" ]; then
|
||||
if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then
|
||||
echo -e "Info: OctoApp Companion is already installed. Download skipped."
|
||||
else
|
||||
echo -e "Info: Downloading OctoApp Companion..."
|
||||
git config --global http.sslVerify false
|
||||
git clone "$OCTOAPP_URL" "$OCTOAPP_FOLDER"
|
||||
git clone "$OCTOAPP_URL" "$OCTOAPP_COMPANION_FOLDER"
|
||||
fi
|
||||
echo -e "Info: Running OctoApp Companion installer..."
|
||||
cd "$OCTOAPP_FOLDER"
|
||||
cd "$OCTOAPP_COMPANION_FOLDER"
|
||||
sh ./install.sh
|
||||
ok_msg "OctoApp Companion has been installed successfully!"
|
||||
return;;
|
||||
|
@ -42,17 +42,17 @@ function install_octoapp(){
|
|||
done
|
||||
}
|
||||
|
||||
function remove_octoapp(){
|
||||
octoapp_message
|
||||
function remove_octoapp_companion(){
|
||||
octoapp_companion_message
|
||||
local yn
|
||||
while true; do
|
||||
remove_msg "OctoApp Companion" yn
|
||||
case "${yn}" in
|
||||
Y|y)
|
||||
echo -e "${white}"
|
||||
echo -e "Info: Running OctoApp Companion installer..."
|
||||
cd "$OCTOAPP_FOLDER"
|
||||
sh ./uninstall.sh
|
||||
echo -e "Info: Running OctoApp Companion uninstaller..."
|
||||
cd "$OCTOAPP_COMPANION_FOLDER"
|
||||
sh ./uninstall.sh
|
||||
ok_msg "OctoApp Companion has been removed successfully!"
|
||||
return;;
|
||||
N|n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue