File tree Expand file tree Collapse file tree 3 files changed +2
-60
lines changed
package/root/usr/local/sbin Expand file tree Collapse file tree 3 files changed +2
-60
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,6 @@ if [ -z "$1" ]; then
1919 echo " Using latest release: $VERSION ."
2020fi
2121
22- VARIANTFILE=" /var/lib/misc/pine64_update_kernel.variant"
23- VARIANT=" "
24- if [ -e " $VARIANTFILE " ]; then
25- VARIANT=$( cat $VARIANTFILE )
26- fi
27-
28- if [ -n " $2 " ]; then
29- VARIANT=" $2 "
30- if [ " $VARIANT " = " default" ]; then
31- VARIANT=" "
32- fi
33- fi
34-
35- if [ -n " $VARIANT " ]; then
36- echo " Using Kernel variant: $VARIANT "
37- fi
38-
3922URL=" https://github.com/ayufan-pine64/linux-build/releases/download/$VERSION /linux-pine64-$VERSION .tar.xz"
4023# URL="https://www.stdin.xyz/downloads/people/longsleep/pine64-images/linux/linux-pine64$VARIANT-$VERSION.tar.xz"
4124# PUBKEY="https://www.stdin.xyz/downloads/people/longsleep/longsleep.asc"
@@ -55,20 +38,6 @@ if [ -e "${CURRENTFILE}" ]; then
5538 CURRENT=$( cat $CURRENTFILE )
5639fi
5740
58- echo " Checking for update ..."
59- ETAG=$( curl -f -I -H " If-None-Match: \" ${CURRENT} \" " -s " ${URL} " | grep ETag| awk -F' "' ' {print $2}' )
60-
61- if [ -z " $ETAG " ]; then
62- echo " Version $VERSION$VARIANT not found."
63- exit 1
64- fi
65-
66- ETAG=" $ETAG$VARIANT "
67- if [ " $ETAG " = " $CURRENT " ]; then
68- echo " You are already on $VERSION version - abort."
69- exit 0
70- fi
71-
7241FILENAME=$TEMP /$( basename ${URL} )
7342
7443downloadAndApply () {
12695 echo " Mark only."
12796fi
12897echo " $ETAG " > " $CURRENTFILE "
129- echo " $VARIANT " > " $VARIANTFILE "
13098sync
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ if [ -z "$1" ]; then
1515fi
1616
1717DEVICE=" /dev/mmcblk0"
18- URL=" https://github.com/ayufan-pine64/linux-build/releases/download/$VERSION /linux-pine64-package-$( cat /etc/pine64_model) -$VERSION .deb"
19- CURRENTFILE=" /var/lib/misc/pine64_update_package.status"
18+ URL=" https://github.com/ayufan-pine64/linux-build/releases/download/$VERSION /linux-pine64-package-$VERSION .deb"
2019
2120if [ " $( id -u) " -ne " 0" ]; then
2221 echo " This script requires root."
@@ -38,26 +37,14 @@ if [ -e "${CURRENTFILE}" ]; then
3837fi
3938
4039echo " Checking for update ..."
41- ETAG=$( curl -L -f -I -H " If-None-Match: \" ${CURRENT} \" " -s " ${URL} " | grep ETag| awk -F' "' ' {print $2}' )
42-
43- if [ -z " $ETAG " ]; then
44- echo " Version $VERSION not found."
45- exit 1
46- fi
47-
48- if [ " $ETAG " = " $CURRENT " ]; then
49- echo " You are already on $VERSION version - abort."
50- exit 0
51- fi
52-
5340FILENAME=$TEMP /$( basename ${URL} )
5441
5542if [ -z " $MARK_ONLY " ]; then
5643 echo " Downloading model package ..."
5744 curl -L " ${URL} " -f --progress-bar --output " ${FILENAME} "
5845
5946 echo " Installing model package ..."
60- dpkg -i " ${FILENAME} "
47+ sudo dpkg -i " ${FILENAME} "
6148
6249 echo " Done - you should reboot now."
6350else
Original file line number Diff line number Diff line change @@ -39,19 +39,6 @@ if [ -e "${CURRENTFILE}" ]; then
3939 CURRENT=$( cat $CURRENTFILE )
4040fi
4141
42- echo " Checking for update ..."
43- ETAG=$( curl -f -I -H " If-None-Match: \" ${CURRENT} \" " -s " ${URL} " | grep ETag| awk -F' "' ' {print $2}' )
44-
45- if [ -z " $ETAG " ]; then
46- echo " Version $VERSION not found."
47- exit 1
48- fi
49-
50- if [ " $ETAG " = " $CURRENT " ]; then
51- echo " You are already on $VERSION version - abort."
52- exit 0
53- fi
54-
5542FILENAME=$TEMP /$( basename ${URL} )
5643
5744downloadAndApply () {
You can’t perform that action at this time.
0 commit comments