File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- ARCH=x64 # or ia32
4- VERSION=$( curl -s https://dl.google.com/widevine-cdm/versions.txt | tail -n1)
3+ # Set ARCH variable
4+ ARCH=" "
5+ case ` uname -m` in
6+ i? 86)
7+ ARCH=" ia32"
8+ ;;
9+ x86_64)
10+ ARCH=" x64"
11+ ;;
12+ esac
13+ [[ -z ${ARCH} ]] && echo " Architecture not supported" 1>&2 && exit 1
514
6- curl -fsSL " $@ " " https://dl.google.com/widevine-cdm/${VERSION} -linux-${ARCH} .zip"
15+ # Detect wget/curl
16+ DLTOOL=" "
17+ which wget && DLTOOL=" wget -O -"
18+ which curl && DLTOOL=" curl -L"
19+ [[ -z ${DLTOOL} ]] && echo " No download tool found on this system" 1>&2 && exit 1
20+
21+ # Begin download
22+ VERSION=$( ${DLTOOL} https://dl.google.com/widevine-cdm/versions.txt | tail -n1)
23+ # Fix download argument for wget
24+ DARG=${@ }
25+ [[ ${DLTOOL} == " wget -O -" ]] && DARG=` echo ${DARG} | sed ' s/\-o /\-O /' ` && DLTOOL=" wget"
26+ ${DLTOOL} ${DARG} " https://dl.google.com/widevine-cdm/${VERSION} -linux-${ARCH} .zip"
You can’t perform that action at this time.
0 commit comments