Automatic prints list updating

This commit is contained in:
Didgeridoohan 2018-03-20 19:31:57 +01:00 committed by GitHub
parent 13141c27ad
commit 9d1ff82722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -8,12 +8,16 @@ LATEFILE=$IMGPATH/.core/service.d/propsconf_late
LOGFILE=/cache/propsconf.log
MAGISKLOC=/data/adb/magisk
BBPATH=$MAGISKLOC/busybox
PRINTSLOC=$MODPATH/prints.sh
PRINTSTMP=/cache/prints.sh
PRINTSWWW="https://raw.githubusercontent.com/Didgeridoohan/MagiskHide-Props-Config/master/common/prints.sh"
alias cat="$BBPATH cat"
alias grep="$BBPATH grep"
alias sed="$BBPATH sed"
alias tr="$BBPATH tr"
alias reboot="/system/bin/reboot"
alias resetprop="$MAGISKLOC/magisk resetprop"
alias sed="$BBPATH sed"
alias tr="$BBPATH tr"
alias wget="$BBPATH wget"
# MagiskHide props
PROPSLIST="
@ -84,3 +88,15 @@ placeholder_update() {
;;
esac
}
download_prints() {
wget -O $PRINTSTMP $PRINTSWWW 2>> $LOGFILE
if [ "$(get_file_value $PRINTSTMP "PRINTSV=")" -gt "$(get_file_value $PRINTSLOC "PRINTSV=")" ]; then
if [ "$(get_file_value $PRINTSTMP "PRINTSTRANSF=")" -ge "$(get_file_value $PRINTSLOC "PRINTSTRANSF=")" ]; then
mv -f $PRINTSTMP $PRINTSLOC
log_handler "Updated prints.sh to v$(get_file_value $PRINTSLOC "PRINTSV=")."
fi
else
rm -f $PRINTSTMP
fi
}

Binary file not shown.