Last active
April 10, 2018 20:36
-
-
Save timsueberkrueb/bdaae352cc6dcaca19b3 to your computer and use it in GitHub Desktop.
Simple installation script for material-browser
This file contains 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
# liri-browser installation script | |
# (C) Copyright 2015 by Tim Süberkrüb | |
# Modifications by Joshua Holland | |
set -e # This makes (haha) the script exit when make'ing liri-browser fails, but is good for debugging. | |
# Also, if a command can't complete, we avoid trying to continue and potentially clobbering stuff. | |
echo "Welcome to the liri-browser installer!" | |
mkdir liri-browser-installer && cd liri-browser-installer # Keep files in a separate directory, i.e. don't clog up ~/Downloads/ | |
# Download & install Qt 5.5 | |
echo -n "Is Qt 5.5 already installed? [y/n] " # If so, don't bother downloading the installer. | |
read qt_installed | |
qt_installed=$(echo "$qt_installed" | tr '[:upper:]' '[:lower:]') | |
if [ "$qt_installed" != "y" ] | |
then | |
echo "Downloading Qt 5.5 ..." | |
if [ -e "qt-unified-linux-x64-online.run" ] | |
then | |
echo "Qt 5.5 already downloaded." | |
else | |
echo "Downloading Qt 5.5 Installer ..." | |
wget download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run &> wget-qt-installer.log | |
fi | |
# Launch installer | |
chmod +x qt-unified-linux-x64-online.run | |
echo "Starting Qt Installer ..." | |
./qt-unified-linux-x64-online.run &> qt-installer.log | |
fi | |
user_name=$(whoami) | |
echo -n "Please enter the path where you installed Qt (e.g. /home/$user_name/Qt5.5): " | |
read install_dir | |
if [ ! -e "$install_dir" ] | |
then | |
echo "$install_dir doesn't seem to exist. Exiting!" | |
exit | |
fi | |
qmake_path="$install_dir/5.5/gcc_64/bin/qmake" | |
if [ ! -e "$qmake_path" ] | |
then | |
echo "Are you sure $install_dir is where Qt 5.5 is installed?" | |
echo "$qmake_path doesn't seem to exist. Exiting!" | |
exit | |
fi | |
echo "qmake executable: $qmake_path" | |
# Initialize build | |
echo "Creating build directory ..." | |
mkdir build && cd build | |
# Download and install qml-material (into build/) | |
echo "Downloading qml-material ..." | |
git clone https://github.com/papyros/qml-material.git &> clone-qml-material.log && cd qml-material | |
echo "Qmake'ing qml-material ..." | |
$qmake_path &> qmake-qml-material.log | |
echo "Make'ing qml-material ..." | |
make &> make-qml-material.log | |
echo "Make installing qml-material (needs root access) ..." | |
sudo make install &> install-qml-material.log | |
cd .. # now in build/ | |
# Download and build liri-browser | |
echo "Downloading liri-browser ..." | |
git clone https://github.com/liri-browser/liri-browser.git &> clone-liri-browser.log && cd liri-browser | |
echo "Qmake'ing liri-browser ..." | |
$qmake_path &> qmake-liri-browser.log | |
echo "Make'ing liri-browser ..." | |
make &> make-liri-browser.log | |
# Run liri-browser | |
echo "Launching liri-browser ..." | |
chmod +x liri-browser | |
./liri-browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment