File indexing completed on 2021-12-21 14:21:08

0001 #!/bin/bash
0002 #Author: Michail Vourlakos, Smith Ar
0003 #Summary: Installation script for Latte Dock Panel
0004 #This script was written and tested on openSuSe Leap 42.1
0005 set -e
0006 
0007 build_type=$1
0008 build_type=${build_type:="Release"}
0009 
0010 enable_make_unique=OFF
0011 
0012 if [ "$1" == "--enable-make-unique" ] || [ "$2" == "--enable-make-unique" ]  ; then
0013     enable_make_unique=ON
0014 fi
0015 
0016 if ! [ -a build ] ; then
0017     mkdir build
0018 fi
0019 
0020 cd build
0021 
0022 if [ -a po ] ; then
0023     sudo rm -fr po
0024 fi
0025 if [ -a locale ] ; then
0026     sudo rm -fr locale
0027 fi
0028 
0029 if [ "$1" == "--translations" ] ; then
0030     cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDE_L10N_BRANCH=trunk -DKDE_L10N_AUTO_TRANSLATIONS=ON -DENABLE_MAKE_UNIQUE=$enable_make_unique -DCMAKE_BUILD_TYPE=$build_type ..
0031     make fetch-translations
0032 elif [ "$1" == "--translations-stable" ] ; then
0033     cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDE_L10N_BRANCH=stable -DKDE_L10N_AUTO_TRANSLATIONS=ON -DENABLE_MAKE_UNIQUE=$enable_make_unique -DCMAKE_BUILD_TYPE=$build_type ..
0034     make fetch-translations    
0035 else
0036     cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDE_L10N_AUTO_TRANSLATIONS=OFF -DENABLE_MAKE_UNIQUE=$enable_make_unique -DCMAKE_BUILD_TYPE=$build_type ..
0037     make
0038 fi
0039 
0040 sudo make install