-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·36 lines (26 loc) · 920 Bytes
/
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
#!/bin/bash
ROOT_UID=0
# Destination directory
if [ "$UID" -eq "$ROOT_UID" ]; then
AURORAE_DIR="/usr/share/aurorae/themes"
SCHEMES_DIR="/usr/share/color-schemes"
WALLPAPER_DIR="/usr/share/wallpapers"
else
AURORAE_DIR="$HOME/.local/share/aurorae/themes"
SCHEMES_DIR="$HOME/.local/share/color-schemes"
WALLPAPER_DIR="$HOME/.local/share/wallpapers"
fi
SRC_DIR=$(cd $(dirname $0) && pwd)
THEME_NAME=One-Dark
[[ ! -d ${AURORAE_DIR} ]] && mkdir -p ${AURORAE_DIR}
[[ ! -d ${SCHEMES_DIR} ]] && mkdir -p ${SCHEMES_DIR}
[[ ! -d ${WALLPAPER_DIR} ]] && mkdir -p ${WALLPAPER_DIR}
install() {
local name=${1}
cp -r ${SRC_DIR}/aurorae/themes/* ${AURORAE_DIR}
cp -r ${SRC_DIR}/color-schemes/* ${SCHEMES_DIR}
cp -r ${SRC_DIR}/wallpaper/* ${WALLPAPER_DIR}
}
echo "Installing '${THEME_NAME} kde themes'..."
install "${name:-${THEME_NAME}}"
echo "Install finished..."