-
Notifications
You must be signed in to change notification settings - Fork 12
/
install.sh
32 lines (26 loc) · 1.08 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
# Get correct distro-dependent installation directories
loc_plugin=$(kf5-config --qt-plugins)
loc_desktop=$(kf5-config --path services|awk -F ':' '{print $NF}')
loc_config=$(kf5-config --prefix)/share/config
# Fetch and unpack packaged files
if [ ! -f krunner-symbols-*-Linux.tar.gz ]; then
wget https://github.com/domschrei/krunner-symbols/releases/download/1.1.0/krunner-symbols-1.1.0-Linux.tar.gz
fi
pkg=$(echo krunner-symbols-*-Linux.tar.gz|awk '{print $NF}')
mkdir -p build
tar xzvf "$pkg" -C build --strip-components=1
cd build
# Fetch current version
version=$(grep X-KDE-PluginInfo-Version plasma-runner-symbols.desktop|grep -oE '[0-9]+\..*\..*')
# Install files
echo "Installing plugin files into system directories ..."
sudo cp krunner_symbols.so "$loc_plugin"/
sudo cp plasma-runner-symbols.desktop "$loc_desktop"/
sudo mkdir -p "$loc_config"
sudo cp krunner-symbolsrc krunner-symbols-full-unicode-index "$loc_config/"
echo "Installation successful. Restarting krunner for the changes to take effect."
if pgrep -x krunner > /dev/null; then
killall krunner
fi