mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
chrome: fix download url
This commit is contained in:
parent
0d44ab3a28
commit
a0114d6fea
@ -1,2 +1,5 @@
|
||||
101
|
||||
- fix download url
|
||||
|
||||
100
|
||||
- initial release
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="chrome"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="100"
|
||||
PKG_REV="101"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="Custom"
|
||||
PKG_SITE="http://www.google.com/chrome"
|
||||
|
@ -10,24 +10,9 @@ ICON=$ADDON_DIR/resources/icon.png
|
||||
CONTROL_FILE=/tmp/curl.done
|
||||
DATA_FILE=/tmp/curl.data
|
||||
|
||||
# check chrome version
|
||||
case "$1" in
|
||||
'latest')
|
||||
CHROME_VER="$(curl -s https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/other.xml.gz | \
|
||||
gzip -df | awk -F\" '/pkgid.*-stable/{ print $10 }')"
|
||||
;;
|
||||
'repo')
|
||||
CHROME_VER="67.0.3396.87"
|
||||
;;
|
||||
*)
|
||||
echo "Usage $0 { latest | repo }"
|
||||
exit 0;
|
||||
;;
|
||||
esac
|
||||
|
||||
# check for enough free disk space
|
||||
if [ $(df . | awk 'END {print $4}') -lt 400000 ]; then
|
||||
kodi-send --action="Notification(Not enough disk space, at least 400mb are required,30000,${ICON})" >/dev/null
|
||||
kodi-send --action="Notification(Not enough disk space, at least 400MB are required,30000,${ICON})" >/dev/null
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
@ -48,12 +33,12 @@ fi
|
||||
mkdir -p $ADDON_DIR/tmp_download
|
||||
cd $ADDON_DIR/tmp_download
|
||||
|
||||
echo "Downloading Chrome version $CHROME_VER"
|
||||
echo "Downloading Chrome"
|
||||
|
||||
# download chrome
|
||||
rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||
(
|
||||
curl -# -O -C - http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_$CHROME_VER-1_amd64.deb 2>${DATA_FILE}
|
||||
curl -# -O -C - https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 2>${DATA_FILE}
|
||||
touch ${CONTROL_FILE}
|
||||
) | \
|
||||
while [ : ]; do
|
||||
@ -68,7 +53,7 @@ rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||
## extract chrome
|
||||
# extrat chrome.deb
|
||||
kodi-send --action="Notification(Extracting Chrome,starting,1000,${ICON})" >/dev/null
|
||||
ar -x google-chrome-stable_$CHROME_VER-1_amd64.deb
|
||||
ar -x google-chrome-stable_current_amd64.deb
|
||||
|
||||
# extract data.tar.xz to chrome-bin directory
|
||||
mkdir $ADDON_DIR/chrome-bin
|
||||
|
@ -9,7 +9,7 @@ oe_setup_addon browser.chrome
|
||||
# check if chrome is already successful installed
|
||||
if [ ! -f "$ADDON_DIR/extract.ok" ]; then
|
||||
cd $ADDON_DIR
|
||||
chrome-downloader repo
|
||||
chrome-downloader
|
||||
fi
|
||||
|
||||
if [ -e $ADDON_HOME/env ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user