Skip to content

Commit 80b1c6e

Browse files
authored
Merge pull request #102 from jpumford/main
use alternate method for auto-grabbing latest version
2 parents 99da8a0 + 2cf6b2c commit 80b1c6e

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

manual-build/install/install.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
22

3-
# Auto-grab latest version
4-
MAKEMKV_VERSION=$(curl --silent 'https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224' | grep MakeMKV.*.for.Linux.is | head -n 1 | sed -e 's/.*MakeMKV //g' -e 's/ .*//g')
5-
63
# Setup taken from https://github.com/tianon/dockerfiles/blob/master/makemkv/Dockerfile
74
# The Expat/MIT License
85
#
@@ -24,6 +21,25 @@ MAKEMKV_VERSION=$(curl --silent 'https://forum.makemkv.com/forum/viewtopic.php?f
2421
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2522
# DEALINGS IN THE SOFTWARE.
2623

24+
# Auto-grab latest version
25+
{
26+
MAKEMKV_VERSION="$(
27+
curl -fsSL 'https://makemkv.com/download/' \
28+
| grep -oE 'makemkv-sha-[0-9.]+.txt' \
29+
| sed -r 's!^makemkv-sha-|[.]txt$!!g'
30+
)"
31+
[ -n "$version" ]
32+
} || {
33+
url="$(
34+
curl -fsSL 'https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224' \
35+
| grep -oE 'href="https?://[^"]+/makemkv-bin-[^"]+.tar.gz"' \
36+
| cut -d'"' -f2
37+
)"
38+
[ -n "$url" ]
39+
MAKEMKV_VERSION="$(basename "$url" | sed -r 's!^makemkv-bin-|[.]tar[.]gz$!!g')"
40+
[ -n "$version" ]
41+
}
42+
2743
# This disc requires Java runtime (JRE), but none was found. Certain functions will fail, please install Java. See http://www.makemkv.com/bdjava/ for details.
2844
set -eux
2945
# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory

0 commit comments

Comments
 (0)