Merge pull request #309 from cronyx/master

formatting, delete old symlink
pull/310/head
cronyx 2022-08-03 17:00:54 +03:00 committed by GitHub
commit 0f052459dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -1 +0,0 @@
../../general/package/openhisilicon

View File

@ -113,20 +113,20 @@ free_resources() {
self_update() { self_update() {
if echo "${args}" | grep "rootfs" || echo "${args}" | grep "kernel" || echo "${args}" | grep -- "-n" > /dev/null 2>&1; then if echo "${args}" | grep "rootfs" || echo "${args}" | grep "kernel" || echo "${args}" | grep -- "-n" > /dev/null 2>&1; then
echo -e "\nOffline upgrade or Overlay clean, skip sysupgrade version check." echo -e "\nOffline upgrade or Overlay clean, skip sysupgrade version check."
else else
echo -e "\nOnline upgrade, checking sysupgrade version..." echo -e "\nOnline upgrade, checking sysupgrade version..."
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade" curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
if [ -f /tmp/sysupgrade ] && grep -q "#!/bin/sh" /tmp/sysupgrade; then if [ -f /tmp/sysupgrade ] && grep -q "#!/bin/sh" /tmp/sysupgrade; then
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='` dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
if ! [ "${scr_version}" = "${dstv}" ]; then if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to run updated script..." echo "A new version is available, trying to run updated script..."
chmod +x /tmp/sysupgrade chmod +x /tmp/sysupgrade
exec /tmp/sysupgrade ${args} exec /tmp/sysupgrade ${args}
echo -e "Done. Restarting...\n" echo -e "Done. Restarting...\n"
exit 1 exit 1
else else
echo "Ok, version match." echo "Ok, version match."
fi fi
else else
echo -e "\nVersion check failed. Possible network connection problem, script is corrupt or not found. Continue with bundled version." echo -e "\nVersion check failed. Possible network connection problem, script is corrupt or not found. Continue with bundled version."
fi fi