-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
37 lines (26 loc) · 1.04 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
33
34
35
36
37
#!/bin/bash
SRC_DIR=$(cd $(dirname $0) && pwd)
ROOT_UID=0
# Destination directory
if [ "$UID" -eq "$ROOT_UID" ]; then
AURORAE_DIR="/usr/share/aurorae/themes"
SCHEMES_DIR="/usr/share/color-schemes"
PLASMA_DIR="/usr/share/plasma/desktoptheme"
else
AURORAE_DIR="$HOME/.local/share/aurorae/themes"
SCHEMES_DIR="$HOME/.local/share/color-schemes"
PLASMA_DIR="$HOME/.local/share/plasma/desktoptheme"
fi
THEME_NAME=Black
[[ ! -d ${AURORAE_DIR} ]] && mkdir -p ${AURORAE_DIR}
[[ ! -d ${SCHEMES_DIR} ]] && mkdir -p ${SCHEMES_DIR}
[[ ! -d ${PLASMA_DIR} ]] && mkdir -p ${PLASMA_DIR}
install() {
local name=${1}
cp -r ${SRC_DIR}/aurorae/* ${AURORAE_DIR}
cp -r ${SRC_DIR}/color-schemes/*.colors ${SCHEMES_DIR}
cp -r ${SRC_DIR}/plasma/desktoptheme/* ${PLASMA_DIR}
}
echo "Установка '${THEME_NAME} kde темы'..."
install "${name:-${THEME_NAME}}"
echo "Установка завершена..."