mirror of https://github.com/OpenIPC/firmware.git
deprecated syntax.
do not use backticks as alias for $() http://mywiki.wooledge.org/BashFAQ/082pull/404/head
parent
a6e8b5b3e1
commit
ad4c11dd4c
|
@ -117,7 +117,7 @@ self_update() {
|
||||||
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 activate updated script..."
|
echo "A new version is available, trying to activate updated script..."
|
||||||
chmod +x /tmp/sysupgrade
|
chmod +x /tmp/sysupgrade
|
||||||
|
|
Loading…
Reference in New Issue