-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·47 lines (38 loc) · 1.48 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
#!/bin/bash
# CHECK PERMISSION AND DIRECTORY
if [ ! $UID -eq 0 ]; then
echo "Permission denied."
exit 1
elif [ ! -d /usr/share/plymouth/themes ]; then
echo "Please setup plymouth."
exit 1
fi
if [ ! $1 ]; then
echo "Please choose theme at least one."
echo "Example: ~# install.sh alter-logo alter-pp"
exit 1
fi
SCRIPT_DIR=$(cd $(dirname $0); pwd)
for ((i=1; i <= $#; i++)); do
case ${!i} in
# INSTALL alter-logo
"alter-logo" ) \
rm -rf /usr/share/plymouth/themes/alter-logo ; \
mkdir /usr/share/plymouth/themes/alter-logo && \
cp $SCRIPT_DIR/alter-logo/intro/* /usr/share/plymouth/themes/alter-logo/ && \
cp $SCRIPT_DIR/alter-logo/loop/* /usr/share/plymouth/themes/alter-logo/ && \
cp $SCRIPT_DIR/alter-logo/misc/* /usr/share/plymouth/themes/alter-logo/ && \
echo "installing alter-logo ......" && plymouth-set-default-theme -R alter-logo >/dev/null 2>&1 && \
echo "INSTALL alter-logo DONE !!!!" || echo "ERROR HAS OCCURRED !!" ;;
# INSTALL alter-pp
"alter-pp" ) \
rm -rf /usr/share/plymouth/themes/alter-pp ; \
mkdir /usr/share/plymouth/themes/alter-pp && \
cp $SCRIPT_DIR/alter-pp/intro/* /usr/share/plymouth/themes/alter-pp/ && \
cp $SCRIPT_DIR/alter-pp/loop/* /usr/share/plymouth/themes/alter-pp/ && \
cp $SCRIPT_DIR/alter-pp/misc/* /usr/share/plymouth/themes/alter-pp/ && \
echo "installing alter-pp ......" && plymouth-set-default-theme -R alter-pp >/dev/null 2>&1 && \
echo "INSTALL alter-pp DONE !!!!" || echo "ERROR HAS OCCURRED !!" ;;
esac
done
exit