Created
February 7, 2025 22:59
-
-
Save swizzlevixen/62fa0541b719da0fe8130ac129f60997 to your computer and use it in GitHub Desktop.
MakeMKV macOS update keydb.cfg from FindVUK Online Database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# This script downloads the latest copy of the FindVUK Online Database, | |
# unzips, and moves it to the logged in user's MakeMKV data directory | |
# NOTE: This script is designed for use on macOS, with the default | |
# location for the MakeMKV data directory. If you have changed the | |
# location in Preferences > General, you will need to edit the line | |
# that moves the file, near the end of the script. | |
# Config variables | |
downloadUrl="http://fvonline-db.bplaced.net/fv_download.php?lang=eng" | |
zipName="keydb_eng.zip" | |
filename="keydb.cfg" | |
# Download | |
echo "Downloading latest FindVUK Online Database..." | |
curl -Lo "/tmp/$zipName" "$downloadUrl" | |
# Check for the file name (case insensitive) inside the zip | |
if unzip -l /tmp/$zipName | grep -qiF "$filename"; then | |
# unzip file to /tmp, without any surrounding folder structure | |
echo "Unzipping..." | |
unzip -j /tmp/$zipName -d /tmp | |
else | |
echo "ERROR: $filename not found inside $zipName" | |
exit 1 | |
fi | |
# Confirm the file exists | |
if [ -f "/tmp/$filename" ]; then | |
# move file to MakeMKV data directory | |
echo "Moving to MakeMKV data directory..." | |
loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
mv /tmp/$filename /Users/$loggedInUser/Library/MakeMKV/$filename | |
rm /tmp/$zipName | |
else | |
echo "ERROR: File not found; possible error unzipping." | |
exit 1 | |
fi | |
echo "Done." | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Windows user, download
keydb.cfg
from http://fvonline-db.bplaced.net/, and put it in%USERPROFILE%\.MakeMKV