From a4065684b00464ca6a999b399b5cfd6f67f5e15c Mon Sep 17 00:00:00 2001 From: mtuszowski Date: Wed, 18 Dec 2024 23:45:40 +0100 Subject: [PATCH] New deploy --- deploy.sh | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index b483556..8dfe419 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,27 +1,82 @@ #!/bin/bash + +total_commands=24 +current_command=0 + +function print_progress { + current_command=$((current_command + 1)) + percent=$((current_command * 100 / total_commands)) + echo "Executing command $current_command/$total_commands ($percent%): $1" +} + cd /home/pi/conjurer || exit +print_progress "cd /home/pi/conjurer" + git pull +print_progress "git pull" + cp ./deploy.sh /home/pi/ +print_progress "cp ./deploy.sh /home/pi/" + cd /home/pi || exit -#cp ./conjurer/bot.py ./Conjurer/ #legacy to be deprecated after refactor is done +print_progress "cd /home/pi" + +cp ./conjurer/LICENSE ./Conjurer/LICENSE +print_progress "cp ./conjurer/LICENSE ./Conjurer/LICENSE" cp ./conjurer/fuckery.jpg ./Conjurer/ +print_progress "cp ./conjurer/fuckery.jpg ./Conjurer/" + cp ./conjurer/willowisp.png ./Conjurer/ +print_progress "cp ./conjurer/willowisp.png ./Conjurer/" + cp ./conjurer/wod_beacon.jpg ./Conjurer/ +print_progress "cp ./conjurer/wod_beacon.jpg ./Conjurer/" + cp ./conjurer/settings.json ./Conjurer/ +print_progress "cp ./conjurer/settings.json ./Conjurer/" + +cp ./conjurer/system_gpt_settings.json ./Conjurer/system_gpt_settings.json +print_progress "cp ./conjurer/system_gpt_settings.json ./Conjurer/system_gpt_settings.json" cp ./conjurer/administration_commands.py ./Conjurer/ +print_progress "cp ./conjurer/administration_commands.py ./Conjurer/" + cp ./conjurer/ai_commands.py ./Conjurer/ +print_progress "cp ./conjurer/ai_commands.py ./Conjurer/" + cp ./conjurer/ai_functions.py ./Conjurer/ +print_progress "cp ./conjurer/ai_functions.py ./Conjurer/" + cp ./conjurer/communication_subroutine.py ./Conjurer/ +print_progress "cp ./conjurer/communication_subroutine.py ./Conjurer/" + cp ./conjurer/constants.py ./Conjurer/ +print_progress "cp ./conjurer/constants.py ./Conjurer/" + cp ./conjurer/librarian_commands.py ./Conjurer/ +print_progress "cp ./conjurer/librarian_commands.py ./Conjurer/" + cp ./conjurer/music_commands.py ./Conjurer/ +print_progress "cp ./conjurer/music_commands.py ./Conjurer/" + cp ./conjurer/music_functions.py ./Conjurer/ +print_progress "cp ./conjurer/music_functions.py ./Conjurer/" + cp ./conjurer/other_commands.py ./Conjurer/ +print_progress "cp ./conjurer/other_commands.py ./Conjurer/" + cp ./conjurer/other_functions.py ./Conjurer/ +print_progress "cp ./conjurer/other_functions.py ./Conjurer/" + cp ./conjurer/radio_commands.py ./Conjurer/ +print_progress "cp ./conjurer/radio_commands.py ./Conjurer/" + cp ./conjurer/voice_recognition_commands.py ./Conjurer/ +print_progress "cp ./conjurer/voice_recognition_commands.py ./Conjurer/" + cp ./conjurer/thin_client.py ./Conjurer/bot.py +print_progress "cp ./conjurer/thin_client.py ./Conjurer/bot.py" sudo systemctl restart conjurer.service +print_progress "sudo systemctl restart conjurer.service" \ No newline at end of file