mirror of https://github.com/ericonr/dotfiles.git
Add helper text and install_most option.
This commit is contained in:
parent
330d2b3b05
commit
44c92bf08b
194
distros/void.sh
194
distros/void.sh
|
@ -9,10 +9,6 @@
|
||||||
|
|
||||||
# install script for Void based systems
|
# install script for Void based systems
|
||||||
|
|
||||||
function print_help () {
|
|
||||||
echo Look inside for available stuff
|
|
||||||
}
|
|
||||||
|
|
||||||
function base () {
|
function base () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
base-system \
|
base-system \
|
||||||
|
@ -22,14 +18,51 @@ function base () {
|
||||||
elogind \
|
elogind \
|
||||||
fscrypt \
|
fscrypt \
|
||||||
gummiboot \
|
gummiboot \
|
||||||
|
iwd \
|
||||||
sbsigntool \
|
sbsigntool \
|
||||||
udisks2 \
|
udisks2 \
|
||||||
vsv
|
vsv
|
||||||
}
|
}
|
||||||
|
function base_desc () {
|
||||||
|
echo "Install base system utilities, with encryption and UEFI support."
|
||||||
|
}
|
||||||
|
|
||||||
function refind () {
|
function refind () {
|
||||||
xbps-install refind
|
xbps-install refind
|
||||||
}
|
}
|
||||||
|
function refind_desc () {
|
||||||
|
echo "Install rEFInd boot manager. Necessary when it's the only system on a device."
|
||||||
|
}
|
||||||
|
|
||||||
|
function term () {
|
||||||
|
xbps-install \
|
||||||
|
bat \
|
||||||
|
bmon \
|
||||||
|
fd \
|
||||||
|
fish-shell \
|
||||||
|
htop \
|
||||||
|
mdcat \
|
||||||
|
neovim \
|
||||||
|
python3 \
|
||||||
|
ripgrep \
|
||||||
|
starship \
|
||||||
|
stow \
|
||||||
|
tmux
|
||||||
|
}
|
||||||
|
function term_desc () {
|
||||||
|
echo "Install basic terminal utilities."
|
||||||
|
}
|
||||||
|
|
||||||
|
function intel () {
|
||||||
|
xbps-install \
|
||||||
|
intel-gpu-tools \
|
||||||
|
libva-intel-driver \
|
||||||
|
intel-media-driver \
|
||||||
|
mesa-intel-dri
|
||||||
|
}
|
||||||
|
function intel_desc () {
|
||||||
|
echo "Install packages for media decode and GPU stuff in Intel-land."
|
||||||
|
}
|
||||||
|
|
||||||
function fonts () {
|
function fonts () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
|
@ -41,6 +74,9 @@ function fonts () {
|
||||||
noto-fonts-emoji \
|
noto-fonts-emoji \
|
||||||
ttf-bitstream-vera
|
ttf-bitstream-vera
|
||||||
}
|
}
|
||||||
|
function fonts_desc () {
|
||||||
|
echo "Basic fonts necessary for browsing the web and normal GUIs."
|
||||||
|
}
|
||||||
|
|
||||||
function themes () {
|
function themes () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
|
@ -49,6 +85,9 @@ function themes () {
|
||||||
breeze-snow-cursor-theme \
|
breeze-snow-cursor-theme \
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
}
|
}
|
||||||
|
function themes_desc () {
|
||||||
|
echo "Color and mouse themes for a good color setup."
|
||||||
|
}
|
||||||
|
|
||||||
function wm () {
|
function wm () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
|
@ -70,6 +109,9 @@ function wm () {
|
||||||
fonts
|
fonts
|
||||||
themes
|
themes
|
||||||
}
|
}
|
||||||
|
function wm_desc () {
|
||||||
|
echo "Install the SwayWM and supporting packages."
|
||||||
|
}
|
||||||
|
|
||||||
function audio () {
|
function audio () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
|
@ -78,39 +120,21 @@ function audio () {
|
||||||
pulseaudio \
|
pulseaudio \
|
||||||
pavucontrol
|
pavucontrol
|
||||||
}
|
}
|
||||||
|
function audio_desc () {
|
||||||
|
echo "Install PulseAudio and alsa."
|
||||||
|
}
|
||||||
|
|
||||||
function media () {
|
function media () {
|
||||||
|
audio
|
||||||
|
|
||||||
xbps-install \
|
xbps-install \
|
||||||
elisa \
|
elisa \
|
||||||
mpv \
|
mpv \
|
||||||
spotifyd \
|
spotifyd \
|
||||||
spotify-tui
|
spotify-tui
|
||||||
}
|
}
|
||||||
|
function media_desc () {
|
||||||
function term () {
|
echo "Install the Elisa player, mpv, and spotify CLI programs."
|
||||||
xbps-install \
|
|
||||||
bat \
|
|
||||||
bmon \
|
|
||||||
fd \
|
|
||||||
fish-shell \
|
|
||||||
htop \
|
|
||||||
mdcat \
|
|
||||||
neovim \
|
|
||||||
python3 \
|
|
||||||
ripgrep \
|
|
||||||
starship \
|
|
||||||
stow \
|
|
||||||
tmux
|
|
||||||
}
|
|
||||||
|
|
||||||
function kicad () {
|
|
||||||
xbps-install \
|
|
||||||
kicad \
|
|
||||||
kicad-footprints \
|
|
||||||
kicad-library \
|
|
||||||
kicad-packages3D \
|
|
||||||
kicad-symbols \
|
|
||||||
kicad-templates
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dev () {
|
function dev () {
|
||||||
|
@ -121,7 +145,11 @@ function dev () {
|
||||||
meson \
|
meson \
|
||||||
ninja \
|
ninja \
|
||||||
git \
|
git \
|
||||||
go
|
go \
|
||||||
|
rustup
|
||||||
|
}
|
||||||
|
function dev_desc () {
|
||||||
|
echo "Install the CLang compiler, some build systems, the Go compiler, and rustup."
|
||||||
}
|
}
|
||||||
|
|
||||||
function emacs () {
|
function emacs () {
|
||||||
|
@ -131,39 +159,45 @@ function emacs () {
|
||||||
hunspell-en_US \
|
hunspell-en_US \
|
||||||
hunspell-pt_BR
|
hunspell-pt_BR
|
||||||
}
|
}
|
||||||
|
function emacs_desc () {
|
||||||
function intel () {
|
echo "(deprecated) Install the GUI version of Emacs."
|
||||||
xbps-install \
|
|
||||||
intel-gpu-tools \
|
|
||||||
iwd \
|
|
||||||
libva-intel-driver \
|
|
||||||
intel-media-driver \
|
|
||||||
mesa-intel-dri
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function qt5 () {
|
function qt5 () {
|
||||||
xbps-install qt5-wayland qt5ct
|
xbps-install \
|
||||||
|
qt5-wayland \
|
||||||
|
qt5ct \
|
||||||
|
konversation \
|
||||||
|
qutebrowser \
|
||||||
|
pdf.js
|
||||||
}
|
}
|
||||||
|
function qt5_desc () {
|
||||||
function kde () {
|
echo "Install Qt5 for Wayland, plus Qutebrowser and Konversation."
|
||||||
qt5
|
|
||||||
xbps-install qutebrowser konversation pdf.js
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mozilla () {
|
function mozilla () {
|
||||||
xbps-install firefox thunderbird
|
xbps-install firefox thunderbird
|
||||||
}
|
}
|
||||||
|
function mozzila_desc () {
|
||||||
|
echo "Install Firefox and Thunderbird."
|
||||||
|
}
|
||||||
|
|
||||||
function libreoffice () {
|
function office () {
|
||||||
xbps-install \
|
xbps-install \
|
||||||
libreoffice \
|
libreoffice \
|
||||||
libreoffice-i18n-en-US \
|
libreoffice-i18n-en-US \
|
||||||
libreoffice-i18n-pt-BR
|
libreoffice-i18n-pt-BR
|
||||||
}
|
}
|
||||||
|
function office_desc () {
|
||||||
|
echo "Install Libreoffice."
|
||||||
|
}
|
||||||
|
|
||||||
function pdf () {
|
function pdf () {
|
||||||
xbps-install zathura zathura-pdf-poppler
|
xbps-install zathura zathura-pdf-poppler
|
||||||
}
|
}
|
||||||
|
function pdf_desc () {
|
||||||
|
echo "Install Zathura."
|
||||||
|
}
|
||||||
|
|
||||||
function flatpak () {
|
function flatpak () {
|
||||||
sudo xbps-install \
|
sudo xbps-install \
|
||||||
|
@ -174,6 +208,9 @@ function flatpak () {
|
||||||
xdg-user-dirs-gtk \
|
xdg-user-dirs-gtk \
|
||||||
xdg-utils
|
xdg-utils
|
||||||
}
|
}
|
||||||
|
function flatpak_desc () {
|
||||||
|
echo "Install Flatpak and supporting packages."
|
||||||
|
}
|
||||||
|
|
||||||
function embedded () {
|
function embedded () {
|
||||||
sudo xbps-install \
|
sudo xbps-install \
|
||||||
|
@ -182,6 +219,58 @@ function embedded () {
|
||||||
cross-arm-none-eabi-gdb \
|
cross-arm-none-eabi-gdb \
|
||||||
openocd
|
openocd
|
||||||
}
|
}
|
||||||
|
function embedded_desc () {
|
||||||
|
echo "Install embedded toolchain and programmer/debugger software."
|
||||||
|
}
|
||||||
|
|
||||||
|
function kicad () {
|
||||||
|
xbps-install \
|
||||||
|
kicad \
|
||||||
|
kicad-footprints \
|
||||||
|
kicad-library \
|
||||||
|
kicad-packages3D \
|
||||||
|
kicad-symbols \
|
||||||
|
kicad-templates
|
||||||
|
}
|
||||||
|
function kicad_desc () {
|
||||||
|
echo "Install KiCad EDA and its resource packages."
|
||||||
|
}
|
||||||
|
|
||||||
|
MOST_PACKAGES="base term intel fonts themes wm audio media dev qt5 mozzila pdf"
|
||||||
|
COMPLEMENT_PACKAGES="refind emacs office flatpak embedded kicad"
|
||||||
|
|
||||||
|
function install_most () {
|
||||||
|
for target in $MOST_PACKAGES
|
||||||
|
do
|
||||||
|
$target
|
||||||
|
done
|
||||||
|
}
|
||||||
|
function install_most_desc () {
|
||||||
|
echo "Install [ ${MOST_PACKAGES} ]"
|
||||||
|
}
|
||||||
|
|
||||||
|
bold=$(tput bold)
|
||||||
|
normal=$(tput sgr0)
|
||||||
|
|
||||||
|
function print_help () {
|
||||||
|
echo "${bold}Usage${normal}: ./void.sh <package-collection>"
|
||||||
|
echo ""
|
||||||
|
echo "These are the available package collections inside:"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
for target in $MOST_PACKAGES $COMPLEMENT_PACKAGES
|
||||||
|
do
|
||||||
|
echo "- ${bold}${target}${normal}: $(${target}_desc)"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "These are the available bundles:"
|
||||||
|
echo ""
|
||||||
|
for bundle in install_most
|
||||||
|
do
|
||||||
|
echo "- ${bold}${bundle}${normal}: $(${bundle}_desc)"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Run function from script:
|
# Run function from script:
|
||||||
# https://stackoverflow.com/questions/8818119/how-can-i-run-a-function-from-a-script-in-command-line
|
# https://stackoverflow.com/questions/8818119/how-can-i-run-a-function-from-a-script-in-command-line
|
||||||
|
@ -189,12 +278,17 @@ function embedded () {
|
||||||
if declare -f "$1" > /dev/null
|
if declare -f "$1" > /dev/null
|
||||||
then
|
then
|
||||||
xbps-install -S
|
xbps-install -S
|
||||||
# call arguments verbatim
|
# call first argument
|
||||||
"$@"
|
"$1"
|
||||||
else
|
else
|
||||||
# Show a helpful error
|
if [ -z $1 ]
|
||||||
echo "'$1' is not a known function name" >&2
|
then
|
||||||
print_help
|
print_help
|
||||||
exit 1
|
else
|
||||||
|
echo "${1} is not a package collection"
|
||||||
|
echo ""
|
||||||
|
print_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue