This commit is contained in:
2026-07-10 15:11:51 +08:00
parent 8bfcf23bc2
commit da17239d7d
148 changed files with 2542 additions and 4873 deletions
+39 -5
View File
@@ -1,15 +1,49 @@
#!/usr/bin/env bash
##makedesc: Install grub-customizer (latest + ppa)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
title
set -eo pipefail
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer && \
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: grub-customizer is not supported on macOS." >&2
exit 1
fi
install() {
echo
echo "==============================================="
echo "Installing grub-customizer"
echo "==============================================="
echo
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
sudo apt install -y --autoremove grub-customizer
[ $? = 0 ] && {
echo
success "grub-customizer installed!"
echo "Finish!"
grub-customizer -v
echo
}
remove() {
echo
echo "==============================================="
echo "Removing grub-customizer"
echo "==============================================="
echo
source_file="/etc/apt/sources.list.d/$(ls -1 /etc/apt/sources.list.d/ | grep danielrichter2007)"
sudo apt remove -y --autoremove grub-customizer
if [ -f "$source_file" ]; then
sudo rm "$source_file"
sudo apt update
fi
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac