Works for my kubuntu install. All the usual prerequisite, tools, libraries and components for installing makeMKV are required and in addition wget, curl and xclip.
How it works:
Clicking the first script update_mkv.sh opens a konsole and calls the second script upd.sh.
upd.sh obtains the version installed from the last time the script was run and the current version from the website then presents you with the versions. It also updates mkv.sh with the current version number then calls mkv.sh and promts you to enter your password or ctrl+c to exit. (if an update is available and you exit without updating, the script wil say you have the current version next time it is executed even if you do not)
mkv.sh deletes any files that relate to previous versions, downloads the current version and extracts then compiles the source. You will need to accept the EULA and type yes to finish the install as usual.
By having xclip installed it will get the temporary beta key from the website and place it on the clipboard.
How to use the scripts:
Make a folder in your home directory named makemkv to place inside the three bash scripts.
Code: Select all
mkdir ~/makemkv
Code: Select all
cd ~/makemkv
Create a new text file and name it update_mkv.sh then open it copy and paste the following code:
Code: Select all
#!/bin/bash
konsole -e ~/makemkv/upd.sh
Code: Select all
#!/bin/bash
# Get MKV version and set as a variable.
version=$(curl "http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224" -s | awk 'FNR == 160 {print $4}')
oldversion=$(awk 'FNR == 6 {print $2}' mkv.sh | cut -c 45-49)
# Open and update mkv.sh.
sed -r -i -e "s/[0-9].[0-9].[0-9].tar.gz/$version.tar.gz/" mkv.sh
sed -r -i -e "s/oss-[0-9].[0-9].[0-9]/oss-$version/" mkv.sh
sed -r -i -e "s/bin-[0-9].[0-9].[0-9]/bin-$version/" mkv.sh
echo The version of makeMKV in mkv.sh is $oldversion.
echo The curret version is $version. Enter your password to upgrade or ctrl+c to exit.
#Lanch mkv.sh.
sudo ./mkv.sh
Code: Select all
#!/bin/bash
# Download newest versions.
rm -rf makemkv*/
rm *.tar.gz
wget http://www.makemkv.com/download/makemkv-oss-1.9.5.tar.gz
wget http://www.makemkv.com/download/makemkv-bin-1.9.5.tar.gz
sleep 1
# Extract tar.gz's
tar -xzvf makemkv-oss-1.9.5.tar.gz
tar -xzvf makemkv-bin-1.9.5.tar.gz
# Unpack both packages and starting from source package do the following steps:
# For makemkv-oss package:
cd makemkv-oss-1.9.5
./configure
make
sudo make install
cd ../
# For makemkv-bin package:
cd makemkv-bin-1.9.5
make
sudo make install
# Remove files.
cd ../
rm -rf makemkv*/
rm *.tar.gz
# Get key and copy to clip board
curl "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053" -s | awk 'FNR == 243 {print $57}' | cut -c 21-88 | xclip -selection clipboard
# Launch MakeMKV
#makemkv
Code: Select all
chmod a+x upd.sh update_mkv.sh mkv.sh
Now from your GUI just click on update_mkv.sh, then enter your password when prompred to proceed.
Wait for the process to complete, press "q" to accept the EULA, type "yes" to install and hit enter. Enjoy.
I hope this is useful to someone.
No doubt there is probably a neater, more eloquent, more simple/sophisticated, correct, prefered way to achieve this so modify and redistribute as you see fit.
Use at your own risk. No warranty is implied or given. No maintainance or or assistance is provided.
gromit4x4