-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.sh
More file actions
executable file
·114 lines (106 loc) · 4.92 KB
/
main.sh
File metadata and controls
executable file
·114 lines (106 loc) · 4.92 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
osCheck() {
if [[ $OSTYPE == "linux-gnu" ]]; then
return 1
fi
return 0
}
cat <<'ASCII'
___ _ _ _ _
___ _ __ ___ / _ (_) ___ ___ ___ _ __ | |_ _ _ __ ___ ___ _ _| |_| |__
/ _ \| '_ \ / _ \/ /_)/ |/ _ \/ __/ _ \_____| '_ \| | | | | '_ ` _ \ / _ \| | | | __| '_ \
| (_) | | | | __/ ___/| | __/ (_| __/_____| |_) | | |_| | | | | | | (_) | |_| | |_| | | |
\___/|_| |_|\___\/ |_|\___|\___\___| | .__/|_|\__, |_| |_| |_|\___/ \__,_|\__|_| |_|
|_| |___/
by - Anxhul10
ASCII
if [ osCheck $1 ]; then
if [[ "$(id -u)" -ne 0 ]]; then
echo "Please run this as root"
else
source /etc/os-release
echo -e "\e[31m$NAME detected !!\e[0m"
if [ "$NAME" = "Ubuntu" ]; then
read -p "Enter the priority of plymouth : " priority < /dev/tty
cd /usr/share/plymouth/themes
sudo rm -rf onePiece-plymouth
sudo git clone https://github.com/Anxhul10/onePiece-plymouth.git
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/onePiece-plymouth/onePiece-plymouth.plymouth $priority
sudo update-alternatives --config default.plymouth
sudo update-initramfs -u
cd onePiece-plymouth/
# ask user for fast and slow animation
echo "choose animation speed:"
echo "1. faster animation"
echo "2. slower animation"
read -n 1 -p "Enter the choice(eg. 1 or 2) : " choice < /dev/tty
if [[ $choice == 1 ]]; then
printf "\nfast animation enabled !!"
fi
if [[ $choice == 2 ]]; then
cp onePiece-plymouth-slow.script onePiece-plymouth.script
printf "slow animation enabled !!"
fi
printf "\n\e[32mPlease restart your system to see Plymouth. !!\e[0m\n"
elif [ "$NAME" = "Fedora Linux" ]; then
# install dependency on each install (redundant process)
echo " Is plymouth-theme-script installed in your Fedora Linux ? y/n"
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
echo "skipping plymouth-theme-script installation!!"
else
sudo dnf install plymouth-theme-script git
fi
cd /usr/share/plymouth/themes
sudo rm -rf onePiece-plymouth
sudo git clone https://github.com/Anxhul10/onePiece-plymouth.git
sudo plymouth-set-default-theme onePiece-plymouth -R
sudo dracut --force
cd onePiece-plymouth/
# ask user for fast and slow animation
echo "choose animation speed:"
echo "1. faster animation"
echo "2. slower animation"
read -n 1 -p "Enter the choice(eg. 1 or 2) : " choice < /dev/tty
if [[ $choice == 1 ]]; then
printf "\nfast animation enabled !!"
fi
if [[ $choice == 2 ]]; then
cp onePiece-plymouth-slow.script onePiece-plymouth.script
printf "slow animation enabled !!"
fi
printf "\n\e[32mPlease restart your system to see Plymouth. !!\e[0m\n"
elif [ "$NAME" = "Arch Linux" ]; then
echo " Is plymouth installed in your Arch Linux ? y/n"
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
echo "skipping plymouth installation!!"
else
sudo pacman -S plymouth
sudo systemctl enable plymouth-start.service
fi
cd /usr/share/plymouth/themes
sudo git clone https://github.com/Anxhul10/onePiece-plymouth.git
sudo plymouth-set-default-theme -R onePiece-plymouth
# ask user for fast and slow animation
echo "choose animation speed:"
echo "1. faster animation"
echo "2. slower animation"
read -n 1 -p "Enter the choice(eg. 1 or 2) : " choice < /dev/tty
if [[ $choice == 1 ]]; then
printf "\nfast animation enabled !!"
fi
if [[ $choice == 2 ]]; then
cp onePiece-plymouth-slow.script onePiece-plymouth.script
printf "slow animation enabled !!"
fi
printf "\n\e[32mPlease restart your system to see Plymouth. !!\e[0m\n"
else
echo "Currently, this CLI supports Ubuntu and Fedora."
echo "If your Linux distribution is not supported, please open an issue at:"
echo "https://github.com/Anxhul10/onePiece-plymouth/issues"
fi
fi
else
echo "Please use linux-gnu"
fi