Skip to content

Instantly share code, notes, and snippets.

@wkettler
Created July 8, 2017 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wkettler/e360cddc048c6cd0a57ace64219272bf to your computer and use it in GitHub Desktop.
Save wkettler/e360cddc048c6cd0a57ace64219272bf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#
# Install/update MakeMKV.
#
TMP=$(mktemp -d)
# Get current version
VERS=$(curl --silent "http://www.makemkv.com/download/" 2>&1 | \
egrep -o 'MakeMKV ([^ ]*) for' | \
sed 's/MakeMKV //' | \
sed 's/ for//' | uniq)
# Get current key
KEY=$(curl --silent "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053" 2>&1 | \
egrep -o 'class="codecontent">([^<]*)' | \
sed 's/class="codecontent">//')
# Install deps
sudo apt-get install -y \
build-essential \
pkg-config \
libc6-dev \
libssl-dev \
libexpat1-dev \
libavcodec-dev \
libgl1-mesa-dev \
libqt4-dev
pushd "${TMP}"
# Install oss
wget "http://www.makemkv.com/download/makemkv-oss-${VERS}.tar.gz"
tar -xvf makemkv-oss-${VERS}.tar.gz
pushd makemkv-oss-${VERS}
./configure --disable-gui
make
sudo make install
popd
# Install bin
wget "http://www.makemkv.com/download/makemkv-bin-${VERS}.tar.gz"
tar -xvf makemkv-bin-${VERS}.tar.gz
pushd makemkv-bin-${VERS}
mkdir -p tmp
touch tmp/eula_accepted
make
sudo make install
popd
popd
rm -rf "${TMP}"
# Install key
echo "app_Key = \"${KEY}\"" > ~/.MakeMKV/settings.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment