-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·61 lines (55 loc) · 1.14 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
xdg=${XDG_DATA_HOME:-${HOME}/.local/share}
DIR="${xdg}/icons/pixelitos/"
ICON_FOLDER="${DIR}/128"
install_pixelitos_theme() {
echo "Creating theme directory: ${DIR}"
mkdir -p "${DIR}"
if cp -r ./* "${DIR}"; then
echo "Installation successful!"
else
echo "Error: Failed to copy files."
exit 1
fi
}
compile_icons() {
echo "Compiling 128x128 icons..."
if ./compile-icons.sh; then
echo "Icons compiled successfully!"
else
echo "Error: Failed to compile icons."
exit 1
fi
}
# Check if the '128' folder exists
if [ ! -d "${ICON_FOLDER}" ]; then
echo "'128' folder does not exist. Skipping recompilation prompt and compiling icons..."
compile_icons
else
echo "Do you want to recompile 128x128 icons? (Y/n)"
read -r answer
case "${answer,,}" in
y|yes)
compile_icons
;;
n|no)
echo "Skipping recompilation."
;;
*)
echo "Invalid input, skipping recompilation."
;;
esac
fi
echo "Do you want to install 'Pixelitos icon theme'? (Y/n)"
read -r answer
case "${answer,,}" in
y|yes)
install_pixelitos_theme
;;
n|no)
echo "Operation cancelled."
;;
*)
echo "Invalid input, operation cancelled."
;;
esac