From edd5e451e04cce9d5db1533e7e832a821fcfaad9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 1 Jan 2023 12:28:10 -0500 Subject: [PATCH] Delete photoprism-update.sh prune --- misc/photoprism-update.sh | 107 -------------------------------------- 1 file changed, 107 deletions(-) delete mode 100644 misc/photoprism-update.sh diff --git a/misc/photoprism-update.sh b/misc/photoprism-update.sh deleted file mode 100644 index 143eb9a2..00000000 --- a/misc/photoprism-update.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -set -e -RELEASE=$(curl -s https://api.github.com/repos/photoprism/photoprism/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-4) }') - -YW=$(echo "\033[33m") -BL=$(echo "\033[36m") -RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' -GN=$(echo "\033[1;92m") -CL=$(echo "\033[m") -PP=$(echo "\e[1;35m") - -while true; do - read -p "Update PhotoPrism LXC. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done -clear -function header_info { - echo -e "${PP} - _____ _ _ _____ _ - | __ \| | | | | __ \ (_) - | |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___ - | ___/| _ \ / _ \| __/ _ \| ___/ __| / __| _ _ \ - | | | | | | (_) | || (_) | | | | | \__ \ | | | | | - |_| |_| |_|\___/ \__\___/|_| |_| |_|___/_| |_| |_| - ${RD} UPDATE -${CL}" -} - -header_info -show_menu() { - printf " ${YW} 1)${GN} Release Branch ${CL}\n" - printf " ${YW} 2)${YW} Develop Branch ${CL}\n" - - printf "Please choose a Install Branch and hit enter or ${RD}x${CL} to exit." - read opt -} - -option_picked() { - message1=${@:-"${CL}Error: No message passed"} - printf " ${YW}${message1}${CL}\n" -} -show_menu -while [ "$opt" != " " ]; do - case $opt in - 1) - clear - header_info - option_picked "Using Release Branch" - BR="release" - break - ;; - 2) - clear - header_info - option_picked "Using Develop Branch" - BR="develop" - break - ;; - - x) - exit - ;; - \n) - exit - ;; - *) - clear - option_picked "Please choose a Install Branch from the menu" - show_menu - ;; - esac -done - -echo -en "${GN} Stopping PhotoPrism... " -sudo systemctl stop photoprism -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cloning PhotoPrism ${BR} branch... " -git clone https://github.com/photoprism/photoprism.git &>/dev/null -cd photoprism -git checkout ${BR} &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Building PhotoPrism ${BR} branch... " -sudo make all &>/dev/null -sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism &>/dev/null -sudo rm -rf /opt/photoprism/assets -sudo cp -r assets/ /opt/photoprism/ &>/dev/null -echo -e "${CM}${CL} \r" - -echo -en "${GN} Cleaning... " -cd ~ -rm -rf photoprism -echo -e "${CM}${CL} \r" - -echo -en "${GN} Starting PhotoPrism... " -sudo systemctl start photoprism -echo -e "${CM}${CL} \n" - -echo -e "${GN} Finished ${CL} \n "