Implement bash-style comment for dependencies list

This commit is contained in:
clsty
2024-02-03 13:05:22 +08:00
parent df8a0a2bfc
commit aea096ce8d
7 changed files with 52 additions and 2357 deletions
@@ -1,9 +1,32 @@
### This file support bash-style comments, and blank lines.
### PKGs on same line will be send to `yay` together, unless `-f` is specified.
### Basic
coreutils cliphist curl fuzzel rsync wget ripgrep gojq npm meson typescript gjs sassc
### Python
# Add `python-setuptools-scm` and `python-wheel` explicitly to fix #197
python-build python-material-color-utilities python-pillow python-poetry python-pywal python-setuptools-scm python-wheel
### Basic graphic env
hyprland-git xorg-xrandr
# xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-hyprland-git
### Player and Audio
pavucontrol wireplumber libdbusmenu-gtk3 plasma-browser-integration playerctl swww
### GTK
webp-pixbuf-loader gtk-layer-shell gtk3 gtksourceview3 gobject-introspection upower yad ydotool
### Gnome
polkit-gnome gnome-keyring gnome-control-center blueberry networkmanager brightnessctl wlsunset gnome-bluetooth-3.0
### Widgets
wayland-idle-inhibitor-git swayidle swaylock-effects-git wlogout wl-clipboard hyprpicker-git grim tesseract slurp
### Fonts and Themes
adw-gtk3-git gradience-git fontconfig lexend-fonts-git ttf-jetbrains-mono-nerd ttf-material-symbols-variable-git ttf-space-mono-nerd fish foot starship
swappy wf-recorder
### Screenshot and Recoder
swappy wf-recorder
+9
View File
@@ -63,3 +63,12 @@ function showfun() {
type -a $1
printf "\e[97m"
}
function remove_bashcomments_emptylines(){
mkdir -p $(dirname $2)
cat $1 | sed -e '/^[[:blank:]]*#/d;s/#.*//' -e '/^[[:space:]]*$/d' > $2
}
function prevent_sudo_or_root(){
case $(whoami) in
root)echo -e "\e[31m[$0]: This script is NOT to be executed with sudo or as root. Aborting...\e[0m";exit 1;;
esac
}