Labels

Friday, 18 March 2016

makemkv wrapper with auto updater

Installs to home folder, creates usr folder under $HOME/.
Does not require root.
Requires xclip to dump latest beta key to "selection" (middle click "clipboard").
Launches makemkv if build succeeded or if already at latest version.

#!/bin/bash

echo $HOME
cd $HOME
URL='http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224'
[[ -n "$1" ]] \
        && VERSION=$1 \
        || VERSION=$(curl --silent "$URL" | grep MakeMKV.*for.Linux.is | head -n 1 | sed -e 's/.*MakeMKV //g' -e 's/ .*//g')

KEY=$(curl --silent 'http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053'| grep T-|sed -e 's/.*codecontent..//g' -e 's/..div. .*//g')
echo "key: $KEY"
echo "$KEY" | xclip

if [[ "$VERSION" = "$(cat $HOME/.makemkv-version)" ]]; then
        echo MakeMKV is up to date.
else
        for r in oss bin; do
                wget -c "http://www.makemkv.com/download/makemkv-$r-$VERSION.tar.gz"
                tar xf makemkv-$r-$VERSION.tar.gz
                cd makemkv-$r-$VERSION
                [[ "$r" = "oss" ]] && ./configure || { mkdir -p tmp; echo accepted >tmp/eula_accepted; }
                make -j 17 install DESTDIR=$HOME/ || { echo -e "###\n### Error occurred, maybe missing build deps?\n### $URL\n###"; sleep 30; exit 1; }
                cd ..
        done
fi

env LD_LIBRARY_PATH=usr/bin:usr/lib:usr/share:usr QT_PLUGIN_PATH=/usr/lib/kde4/plugins:$QT_PLUGIN_PATH usr/bin/makemkv \
        && echo $VERSION | tee $HOME/.makemkv-version

2 comments:

  1. Wow, amazing block structure! How long
    Have you written a blog before? Working on a blog seems easy.
    The overview of your website is pretty good, not to mention what it does.
    In the content!makemkv-crack
    facebook-social-toolkit-crack
    cubase-pro-crack
    adobe-dimension-cc-crack
    fifa-mobile-soccer-mod-apk-crack
    zemax-opticstudio-crack
    proteus-pro-crack
    system-mechanic-ultimate-defence-crack
    hitfilm-pro-crack

    ReplyDelete

  2. Really Appreciable Article, Honestly Said The Thing Actually I liked The most is the step-by-step explanation of everything needed to be known for a blogger or webmaster to comment, I am going show this to my other blogger friends too.
    makemkv-crack

    ReplyDelete