mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
chrome: fix download url
This commit is contained in:
parent
0d44ab3a28
commit
a0114d6fea
@ -1,2 +1,5 @@
|
|||||||
|
101
|
||||||
|
- fix download url
|
||||||
|
|
||||||
100
|
100
|
||||||
- initial release
|
- initial release
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
PKG_NAME="chrome"
|
PKG_NAME="chrome"
|
||||||
PKG_VERSION="1.0"
|
PKG_VERSION="1.0"
|
||||||
PKG_REV="100"
|
PKG_REV="101"
|
||||||
PKG_ARCH="x86_64"
|
PKG_ARCH="x86_64"
|
||||||
PKG_LICENSE="Custom"
|
PKG_LICENSE="Custom"
|
||||||
PKG_SITE="http://www.google.com/chrome"
|
PKG_SITE="http://www.google.com/chrome"
|
||||||
|
@ -10,24 +10,9 @@ ICON=$ADDON_DIR/resources/icon.png
|
|||||||
CONTROL_FILE=/tmp/curl.done
|
CONTROL_FILE=/tmp/curl.done
|
||||||
DATA_FILE=/tmp/curl.data
|
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
|
# check for enough free disk space
|
||||||
if [ $(df . | awk 'END {print $4}') -lt 400000 ]; then
|
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;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -48,12 +33,12 @@ fi
|
|||||||
mkdir -p $ADDON_DIR/tmp_download
|
mkdir -p $ADDON_DIR/tmp_download
|
||||||
cd $ADDON_DIR/tmp_download
|
cd $ADDON_DIR/tmp_download
|
||||||
|
|
||||||
echo "Downloading Chrome version $CHROME_VER"
|
echo "Downloading Chrome"
|
||||||
|
|
||||||
# download chrome
|
# download chrome
|
||||||
rm -f ${CONTROL_FILE} ${DATA_FILE}
|
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}
|
touch ${CONTROL_FILE}
|
||||||
) | \
|
) | \
|
||||||
while [ : ]; do
|
while [ : ]; do
|
||||||
@ -68,7 +53,7 @@ rm -f ${CONTROL_FILE} ${DATA_FILE}
|
|||||||
## extract chrome
|
## extract chrome
|
||||||
# extrat chrome.deb
|
# extrat chrome.deb
|
||||||
kodi-send --action="Notification(Extracting Chrome,starting,1000,${ICON})" >/dev/null
|
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
|
# extract data.tar.xz to chrome-bin directory
|
||||||
mkdir $ADDON_DIR/chrome-bin
|
mkdir $ADDON_DIR/chrome-bin
|
||||||
|
@ -9,7 +9,7 @@ oe_setup_addon browser.chrome
|
|||||||
# check if chrome is already successful installed
|
# check if chrome is already successful installed
|
||||||
if [ ! -f "$ADDON_DIR/extract.ok" ]; then
|
if [ ! -f "$ADDON_DIR/extract.ok" ]; then
|
||||||
cd $ADDON_DIR
|
cd $ADDON_DIR
|
||||||
chrome-downloader repo
|
chrome-downloader
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e $ADDON_HOME/env ]
|
if [ -e $ADDON_HOME/env ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user