-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall.sh
executable file
·90 lines (71 loc) · 2.37 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
# Get the directory where the script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Change the current working directory to the script's directory
cd "$SCRIPT_DIR" || { echo "Failed to change directory to script's location. Exiting."; exit 1; }
read -p "Install Bluecurve? (y/N): " user_input
# Default to 'N' if the input is empty
user_input=${user_input:-N}
if ! [[ "$user_input" =~ ^[Yy]$ ]]; then
echo "Exiting."
exit 1
fi
function compile_engine {
cd engine/src
rm -rf build # Remove build directory if it already exists
mkdir build && cd build
cmake ..
make && make install
cd "$SCRIPT_DIR"
}
ARCH=$(uname -m)
# Copy the GTK 2 engine to the appropriate directory
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "i686" ] || [ "$ARCH" = "i386" ]; then
read -p "Install pre-compiled GTK 2 engine? Selecting no will compile the engine instead (Y/n): " user_input
# Default to 'Y' if the input is empty
user_input=${user_input:-Y}
if [[ "$user_input" =~ ^[Yy]$ ]]; then
echo "Installing GTK 2 engine..."
mkdir -p ~/.gtk-2.0/engines
if [ "$ARCH" = "x86_64" ]; then
cp engine/x86_64/libbluecurve.so ~/.gtk-2.0/engines
else
cp engine/i686/libbluecurve.so ~/.gtk-2.0/engines
fi
else
echo "Compiling GTK 2 engine..."
compile_engine
fi
else
# If user is running something other than x86_64 or i686, they have to manually compile the theme
echo "Compiling GTK 2 engine..."
compile_engine
fi
# Copy icon set
echo "Installing icon set..."
mkdir -p ~/.icons
cp -r icons/* ~/.icons
# Copy themes
echo "Installing themes..."
mkdir -p ~/.themes
rm -rf ~/.themes/Bluecurve # Delete old theme files
rm -rf ~/.themes/Bluecurve-BerriesAndCream
rm -rf ~/.themes/Bluecurve-Classic-RH8
rm -rf ~/.themes/Bluecurve-Classic-RH9
rm -rf ~/.themes/Bluecurve-Gnome
rm -rf ~/.themes/Bluecurve-Grape
rm -rf ~/.themes/Bluecurve-Lime
rm -rf ~/.themes/Bluecurve-Slate
rm -rf ~/.themes/Bluecurve-Strawberry
rm -rf ~/.themes/Bluecurve-Tangerine
cp -r themes/* ~/.themes
read -p "Install the Luxi font family? (only do this if your distribution does not include them) (y/N): " user_input
# Default to 'N' if the input is empty
user_input=${user_input:-N}
if [[ "$user_input" =~ ^[Yy]$ ]]; then
echo "Installing the Luxi font family..."
mkdir -p ~/.local/share/fonts
cp fonts/*.ttf ~/.local/share/fonts
fi
echo " "
echo "Bluecurve has been installed on your system!"