mirror of
https://github.com/byReqz/conn.git
synced 2024-11-22 00:53:14 +00:00
update to new hashes
This commit is contained in:
parent
9901cfd6d7
commit
b06b9ab5b8
6
conn.sh
6
conn.sh
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# license: gpl-3
|
||||
|
||||
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
|
||||
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/hash) != $(md5sum $0 | cut -c -32) ]] && [[ -z $1 ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/hash) != $(md5sum $0 | cut -c -32) ]] && [[ $1 != "--update" ]] || [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/hash) != $(md5sum $0 | cut -c -32) ]] && [[ $1 != "-u" ]];then
|
||||
echo "#############################################"
|
||||
echo -e "\e[4mnote: newer version detected, use -u to update\e[0m"
|
||||
echo "#############################################"
|
||||
@ -176,13 +176,13 @@ fi
|
||||
echo "------------------------------------------------"
|
||||
exit
|
||||
elif [[ $1 == "-u" ]] || [[ "$1" == "--update" ]];then
|
||||
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]];then
|
||||
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/hash) != $(md5sum $0 | cut -c -32) ]];then
|
||||
wget -O $0 --quiet "https://raw.githubusercontent.com/byReqz/conn/main/conn.sh"
|
||||
echo "#############################################"
|
||||
echo -e "\e[4mscript has been updated to the newest version\e[0m"
|
||||
echo "#############################################"
|
||||
exit
|
||||
elif [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/conn.sh | md5sum | cut -c -32) = $(md5sum $0 | cut -c -32) ]];then
|
||||
elif [[ $(curl -s https://raw.githubusercontent.com/byReqz/conn/main/hash) = $(md5sum $0 | cut -c -32) ]];then
|
||||
echo "#############################################"
|
||||
echo "no newer version found"
|
||||
echo "#############################################"
|
||||
|
Loading…
Reference in New Issue
Block a user