更新 simpleupdates/simpleupdate
This commit is contained in:
parent
74ebba86e2
commit
6ea5759ce2
@ -36,7 +36,7 @@ trim_log_file() {
|
|||||||
check_for_updates() {
|
check_for_updates() {
|
||||||
echo "$(date): Checking for updates..."
|
echo "$(date): Checking for updates..."
|
||||||
for dir in "${DIRECTORIES[@]}"; do
|
for dir in "${DIRECTORIES[@]}"; do
|
||||||
local remote_rev=$(wget -qO- "$BASE_URL/$dir/.rev")
|
local remote_rev=$(curl -s "$BASE_URL/$dir/.rev")
|
||||||
local local_rev_file="/usrdata/$dir/.rev"
|
local local_rev_file="/usrdata/$dir/.rev"
|
||||||
|
|
||||||
if [[ ! -f "$local_rev_file" ]]; then
|
if [[ ! -f "$local_rev_file" ]]; then
|
||||||
@ -48,7 +48,7 @@ check_for_updates() {
|
|||||||
|
|
||||||
if [[ "$remote_rev" -gt "$local_rev" ]]; then
|
if [[ "$remote_rev" -gt "$local_rev" ]]; then
|
||||||
echo "Update available for $dir, updating..."
|
echo "Update available for $dir, updating..."
|
||||||
wget -qO "/tmp/update_${dir}.sh" "$BASE_URL/simpleupdates/scripts/update_${dir}.sh"
|
curl -so "/tmp/update_${dir}.sh" "$BASE_URL/simpleupdates/scripts/update_${dir}.sh"
|
||||||
chmod +x "/tmp/update_${dir}.sh"
|
chmod +x "/tmp/update_${dir}.sh"
|
||||||
"/tmp/update_${dir}.sh"
|
"/tmp/update_${dir}.sh"
|
||||||
else
|
else
|
||||||
@ -127,7 +127,7 @@ fi
|
|||||||
force_check_for_updates() {
|
force_check_for_updates() {
|
||||||
echo "$(date): Checking for updates..."
|
echo "$(date): Checking for updates..."
|
||||||
for dir in "${DIRECTORIES[@]}"; do
|
for dir in "${DIRECTORIES[@]}"; do
|
||||||
local remote_rev=$(wget -qO- "$BASE_URL/$dir/.rev")
|
local remote_rev=$(curl -s "$BASE_URL/$dir/.rev")
|
||||||
local local_rev_file="/usrdata/$dir/.rev"
|
local local_rev_file="/usrdata/$dir/.rev"
|
||||||
|
|
||||||
if [[ ! -f "$local_rev_file" ]]; then
|
if [[ ! -f "$local_rev_file" ]]; then
|
||||||
@ -139,7 +139,7 @@ force_check_for_updates() {
|
|||||||
|
|
||||||
if [[ "$remote_rev" -gt "$local_rev" ]]; then
|
if [[ "$remote_rev" -gt "$local_rev" ]]; then
|
||||||
echo "Update available for $dir, updating..."
|
echo "Update available for $dir, updating..."
|
||||||
wget -qO "/tmp/update_${dir}.sh" "$BASE_URL/simpleupdates/scripts/update_${dir}.sh"
|
curl -so "/tmp/update_${dir}.sh" "$BASE_URL/simpleupdates/scripts/update_${dir}.sh"
|
||||||
chmod +x "/tmp/update_${dir}.sh"
|
chmod +x "/tmp/update_${dir}.sh"
|
||||||
"/tmp/update_${dir}.sh"
|
"/tmp/update_${dir}.sh"
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user