-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathup
18 lines (18 loc) · 1003 Bytes
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
MODDIR=${0%/*}
update="$(curl -s --connect-timeout 3 -m 5 https://topdalao.lanzouo.com/b02cm5hdc | egrep 'MF_update,' | sed -n 's/.*MF_update,//g;s/\].*//g;$p')"
if [ ! -n "$update" ]; then
update="$(curl -s --connect-timeout 3 -m 5 http://z23r562938.iask.in/MF_magisk/upmf.txt | egrep 'MF_update,' | sed -n 's/.*MF_update,//g;s/\].*//g;$p')"
fi
update_version="$(echo -E "$update" | sed -n 's/.*\[//g;$p')"
if [ -n "$update_version" ]; then
Host_version="$(cat "$MODDIR/mf.sh" | egrep '^#version=' | sed -n 's/.*version=//g;$p')"
if [ "$update_version" != "$Host_version" -o "$(cat "$MODDIR/module.prop" | egrep '^# ##' | sed -n '$p')" != '# ##' ]; then
update_curl="$(echo -E "$update" | sed -n 's/,.*//g;$p')"
update_sh="$(curl -s --connect-timeout 3 -m 5 "$update_curl/upmf.sh")"
if [ "$(echo -E "$update_sh" | egrep '^## #' | sed -n '$p')" = '## #' ]; then
echo -E "$update_sh" > "$MODDIR/upmf.sh" &&
chmod 0755 "$MODDIR/upmf.sh" &&
"$MODDIR/upmf.sh" > /dev/null 2>&1
fi
fi
fi