mirror of
https://github.com/byReqz/conn.git
synced 2024-11-01 01:03:14 +00:00
change of update system
This commit is contained in:
parent
444aed9a37
commit
5605740317
8
conn.sh
8
conn.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
version=21
|
|
||||||
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/version) > "$version" ]] && [[ -z $1 ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/version) > "$version" ]] && [[ $1 != "--update" ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/version) > "$version" ]] && [[ $1 != "-u" ]];then
|
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]] && [[ -z $1 ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]] && [[ $1 != "--update" ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]] && [[ $1 != "-u" ]];then
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
echo -e "\e[4mnote: newer version detected, use -u to update\e[0m"
|
echo -e "\e[4mnote: newer version detected, use -u to update\e[0m"
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
@ -82,13 +82,13 @@ fi
|
|||||||
echo "------------------------------------------------"
|
echo "------------------------------------------------"
|
||||||
exit
|
exit
|
||||||
elif [[ $1 == "-u" ]] || [[ "$1" == "--update" ]];then
|
elif [[ $1 == "-u" ]] || [[ "$1" == "--update" ]];then
|
||||||
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/version) > "$version" ]];then
|
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]];then
|
||||||
wget -O $0 --quiet "https://raw.githubusercontent.com/byReqz/conn/main/conn.sh"
|
wget -O $0 --quiet "https://raw.githubusercontent.com/byReqz/conn/main/conn.sh"
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
echo -e "\e[4mscript has been updated to the newest version\e[0m"
|
echo -e "\e[4mscript has been updated to the newest version\e[0m"
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
exit
|
exit
|
||||||
elif (( $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/version) <= "$version" ));then
|
elif [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) = $(md5sum $0 | cut -c -32) ]];then
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
echo "no newer version found"
|
echo "no newer version found"
|
||||||
echo "#############################################"
|
echo "#############################################"
|
||||||
|
Loading…
Reference in New Issue
Block a user