Skip to content

Instantly share code, notes, and snippets.

@fwenzel
Last active January 21, 2021 14:10
Show Gist options
  • Save fwenzel/3375705 to your computer and use it in GitHub Desktop.
Save fwenzel/3375705 to your computer and use it in GitHub Desktop.
A convenient little script to install MakeMKV on Linux
#!/bin/bash
if [ "$1" == "" ]; then
echo "Usage: $0 1.8.0"
echo "to download and install MakeMKV 1.8.0"
exit 1
fi
# Collect sudo credentials
sudo -v
VER="$1"
TMPDIR=`mktemp -d`
# Install prerequisites
sudo apt-get install build-essential pkg-config libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev libqt4-dev
# Install this version of MakeMKV
pushd $TMPDIR
for PKG in bin oss; do
PKGDIR="makemkv-$PKG-$VER"
PKGFILE="$PKGDIR.tar.gz"
wget "http://www.makemkv.com/download/$PKGFILE"
tar xzf $PKGFILE
pushd $PKGDIR
# pre-1.8.6 version
if [ -e "./makefile.linux" ]; then
make -f makefile.linux
sudo make -f makefile.linux install
# post-1.8.6 version
else
if [ -e "./configure" ]; then
./configure
fi
make
sudo make install
fi
popd
done
popd
# Remove temporary directory
if [ -e "$TMPDIR" ]; then rm -rf $TMPDIR; fi
@netimen
Copy link

netimen commented Apr 22, 2016

Thanks for the great script first of all!

But it is there any way to remove all user interaction from it so it could be called from a post-installation script?

@jvuori
Copy link

jvuori commented Dec 3, 2016

User interaction can be removed by writing "accepted" into file tmp/eula_accepted just before calling make. See https://gist.github.com/jvuori/b595b201dbb6bfdbb95d632efaf6474a#file-install_makemkv-sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment