forked from yeyushengfan258/Lyra-Cursors
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·43 lines (34 loc) · 796 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·43 lines (34 loc) · 796 Bytes
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
#!/bin/bash
ROOT_UID=0
DEST_DIR=
THEME=$1
if [[ "$THEME" == "" ]]; then
echo -n "Use the default theme (LyraR)? (y/n): "
read ANSWER
if [[ $ANSWER != "y" && $ANSWER != "yes" ]]; then
echo -n "Please enter a theme name: "
read NEWTHEME
THEME=$NEWTHEME
else
THEME=LyraR
fi
fi
if [ ! -d "dist" ]; then
echo "No dist directory found; run the build script first."
exit 1
fi
if [ ! -d "dist/$THEME-cursors" ]; then
echo "Theme \"$THEME\" has not been built."
exit 1
fi
# Destination directory
if [ "$UID" -eq "$ROOT_UID" ]; then
DEST_DIR="/usr/share/icons"
else
DEST_DIR="$HOME/.local/share/icons"
fi
if [ -d "$DEST_DIR/$THEME-cursors" ]; then
rm -r "$DEST_DIR/$THEME-cursors"
fi
cp -pr dist/$THEME-cursors $DEST_DIR/$THEME-cursors
echo "Finished..."