mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
parent
e7ec3d0275
commit
8e331fcbff
155 changed files with 12962 additions and 11552 deletions
|
@ -1,28 +1,28 @@
|
|||
#!/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) }') \
|
||||
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"`
|
||||
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"`
|
||||
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.";;
|
||||
[Yy]*) break ;;
|
||||
[Nn]*) exit ;;
|
||||
*) echo "Please answer yes or no." ;;
|
||||
esac
|
||||
done
|
||||
clear
|
||||
function header_info {
|
||||
echo -e "${PP}
|
||||
echo -e "${PP}
|
||||
_____ _ _ _____ _
|
||||
| __ \| | | | | __ \ (_)
|
||||
| |__) | |__ ___ | |_ ___ | |__) | __ _ ___ _ __ ___
|
||||
|
@ -34,7 +34,7 @@ ${CL}"
|
|||
}
|
||||
|
||||
header_info
|
||||
show_menu(){
|
||||
show_menu() {
|
||||
printf " ${YW} 1)${GN} Release Branch ${CL}\n"
|
||||
printf " ${YW} 2)${YW} Develop Branch ${CL}\n"
|
||||
|
||||
|
@ -42,37 +42,41 @@ show_menu(){
|
|||
read opt
|
||||
}
|
||||
|
||||
option_picked(){
|
||||
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;
|
||||
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;
|
||||
2)
|
||||
clear
|
||||
header_info
|
||||
option_picked "Using Develop Branch"
|
||||
BR="develop"
|
||||
break
|
||||
;;
|
||||
|
||||
x)exit;
|
||||
x)
|
||||
exit
|
||||
;;
|
||||
\n)exit;
|
||||
\n)
|
||||
exit
|
||||
;;
|
||||
*)clear;
|
||||
option_picked "Please choose a Install Branch from the menu";
|
||||
show_menu;
|
||||
*)
|
||||
clear
|
||||
option_picked "Please choose a Install Branch from the menu"
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
done
|
||||
esac
|
||||
done
|
||||
|
||||
echo -en "${GN} Stopping PhotoPrism... "
|
||||
sudo systemctl stop photoprism
|
||||
|
@ -100,5 +104,3 @@ sudo systemctl start photoprism
|
|||
echo -e "${CM}${CL} \n"
|
||||
|
||||
echo -e "${GN} Finished ${CL} \n "
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue