Ubuntu: Install makemkv and update simply

MakeMKV is software to convert blu-ray and dvd to mkv, whilst it is in development it is currently free as shareware for Linux. As a consequence it updates every other month and you have to install and update it manually. You will occasionally need grab a new licence key for the shareware version which is avaiable from the MakeMKV forums. I started to write my own script to download, install and keep up to date MakeMKV. However, after getting my own script to work I found this far more elegant solution that I wanted to share. All kudos to Jeff Bower at ebower.com...




Download the script from here and read Jeff's full thread on MakeMKV and the script here. Jeff also has the script in his PPA if you want to add it via apt-get or aptitude, which will keep the update script up to date with any of Jeff's changes.




**This script has been updated to work with the new filename format**


Note as of version 1.7.6 libexpatl-dev is now a dependency:
sudo apt-get install libexpatl-dev




To use the script open a terminal type the path and name of the script in, along with the latest MakeMKV version (v1.7.6 as of today):


makemkv-install 1.7.6


And the makemkv-install script remember to chmod the script to make it executable with sudo chmod 700 makemkv-install:


#!/bin/bash

if [ ! $# = 1 ]; then
  echo Usage:
  echo $(basename $0) version
  echo ""
  echo Example:
  echo $(basename $0) 1.7.6
  echo $(basename $0) latest \# Install the latest version of MakeMKV
  exit 1
fi

version=$1
origdir=$(pwd)

if [ "$version" = "latest" ]; then
  version=$(curl --silent http://www.makemkv.com/download/ |grep MakeMKV\  |head -n1 | awk '{print $2}' | sed 's/v//g' | sed 's/<\/li>//g')
  echo Latest version is $version
fi

sudo apt-get install vlc build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev

cd /tmp
echo '****** Downloading makemkv ******'
wget http://www.makemkv.com/download/makemkv-bin-${version}.tar.gz -O makemkv-bin-${version}.tar.gz
result=$?
if [ ! $result = 0 ]; then
  echo Downloading makemkv bin file for $version failed - aborting
  exit 2
fi

wget http://www.makemkv.com/download/makemkv-oss-${version}.tar.gz -O makemkv-oss-${version}.tar.gz
result=$?
if [ ! $result = 0 ]; then
  echo Downloading makemkv oss file for $version failed - aborting
  exit 2
fi

echo '****** Extracting makemkv ******'
tar -vzxf makemkv-bin-${version}.tar.gz
result=$?
if [ ! $result = 0 ]; then
  echo Extracting makemkv bin file for $version failed - aborting
  exit 2
fi

tar -vzxf makemkv-oss-${version}.tar.gz
result=$?
if [ ! $result = 0 ]; then
  echo Extracting makemkv oss file for $version failed - aborting
  exit 2
fi

cd /tmp/makemkv-bin-${version}
echo '****** Building makemkv bin ******'
make -f makefile.linux
result=$?
if [ ! $result = 0 ]; then
  echo Building makemkv bin for $version failed - aborting
  exit 2
fi
sudo make -f makefile.linux install
result=$?
if [ ! $result = 0 ]; then
  echo Installing makemkv bin for $version failed - aborting
  exit 2
fi


cd /tmp/makemkv-oss-${version}
echo '****** Building makemkv oss ******'
make -f makefile.linux
result=$?
if [ ! $result = 0 ]; then
  echo Building makemkv oss for $version failed - aborting
  echo '****** Certain systems may require a compiler switch change ******'
  echo Please edit /tmp/makemkv-oss-${version}/makefile.linux and change:
  grep -n "-lpthread -lz -lrt"
  echo to:
  echo '-lQtDBus -lpthread -lz -lrt'
  echo ""
  echo "See http://www.makemkv.com/forum2/viewtopic.php?f=3&t=2566 for details"
  exit 2
fi
sudo make -f makefile.linux install
result=$?
if [ ! $result = 0 ]; then
  echo Installing makemkv oss for $version failed - aborting
  exit 2
fi

echo '***** Cleaning Up ******'
cd $origdir
sudo rm -r /tmp/makemkv-oss-${version}
sudo rm -r /tmp/makemkv-bin-${version}
rm /tmp/makemkv-oss-${version}.tar.gz
rm /tmp/makemkv-bin-${version}.tar.gz

5 comments:

  1. Thanks a bunch for posting this. It has saved a lot of time.

    ReplyDelete
  2. Very good script! Works great. Thanks

    ReplyDelete
  3. Sommige gebruikers hebben foutcode 0xc00001 op Windows 10 gerapporteerd bij het installeren van Windows 10. Wanneer deze fout optreedt, wordt de installatie herhaald en blijft het foutbericht verschijnen. Ik raad u aan om het automatische herstelprogramma te downloaden om pc-prestaties en andere problemen op te lossen. Hier zijn enkele methoden die u zullen helpen bij het oplossen van de 0xc0000001-foutcode tijdens het installeren van Windows 10. Voer deze methoden alleen uit als u er absoluut zeker van bent dat u het correct kunt doen. Zo niet, dan kunt u het erger maken. Vraag bij twijfel een technisch deskundige om advies via for more information Microsoft Klantenservice Nederland. Als u het zich niet kunt veroorloven, wilt u misschien geautomatiseerde software om de klus te klaren. technici zijn 24/7 beschikbaar

    ReplyDelete
  4. I am happy to be here and this wonderful blog. I have found here lots of important information for my knowledge I need. Thanks for sharing this amazing post. or instant support related to Common Roadrunner Email Problems Please contact our team for best solution.

    ReplyDelete

Note: only a member of this blog may post a comment.