Refactor the software install workflow
This commit is contained in:
parent
0ebca3e82a
commit
a7be9fa736
|
@ -5,6 +5,9 @@ begin
|
|||
|
||||
function installSW -V dir
|
||||
yayinst firefox
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/Firefox/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ begin
|
|||
|
||||
yayinst \
|
||||
icedtea-web
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
|
|
|
@ -19,8 +19,6 @@ begin
|
|||
# File Exchange Support for KDE Connect: https://wiki.archlinux.org/title/KDE#KDE_Connect
|
||||
) sshfs \
|
||||
fwupd
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
|
|
|
@ -6,8 +6,6 @@ begin
|
|||
function installSW
|
||||
yayinst \
|
||||
pennywise-bin
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
|
|
|
@ -14,8 +14,6 @@ begin
|
|||
swtpm \
|
||||
lxc \
|
||||
virt-bootstrap-git
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
|
|
|
@ -3,10 +3,12 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst \
|
||||
aliae-bin
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/aliae/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -3,12 +3,14 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst brave-bin (
|
||||
# brave-beta-bin
|
||||
# brave-nightly-bin
|
||||
)
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/brave/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst \
|
||||
git \
|
||||
git-lfs \
|
||||
|
@ -11,8 +11,10 @@ begin
|
|||
gitflow-bashcompletion-avh \
|
||||
gitflow-fishcompletion-avh \
|
||||
gitflow-zshcompletion-avh
|
||||
end
|
||||
|
||||
and fish "$dir/../../../Common/Software/git/main.fish" configure
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/git/main.fish" configure
|
||||
end
|
||||
|
||||
runInstaller $argv
|
||||
|
|
|
@ -32,8 +32,6 @@ begin
|
|||
|
||||
rm -rf "$contextRoot"
|
||||
end
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
|
|
|
@ -3,8 +3,11 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst grub-theme-minegrub-git
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/minegrub-theme/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst nodejs-n
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
sudo --preserve-env --set-home fish "$dir/../../../Common/Software/n/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ begin
|
|||
yayinst \
|
||||
openssh \
|
||||
libfido2
|
||||
|
||||
source (status filename) configure
|
||||
end
|
||||
|
||||
function configureSW
|
||||
|
|
|
@ -3,8 +3,11 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst pyenv
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/pyenv/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -4,10 +4,12 @@ begin
|
|||
source "$dir/../../Scripts/software.fish"
|
||||
source "$dir/../../../Common/Software/rclone/main.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst \
|
||||
rclone
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/rclone/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ begin
|
|||
# yes | yayinst sddm-git
|
||||
# stable version
|
||||
yayinst sddm
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
|
|
|
@ -4,7 +4,7 @@ begin
|
|||
source "$dir/../../Scripts/software.fish"
|
||||
source "$dir/../../../Common/Software/vim/main.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst (
|
||||
# Necessary for accessing clipboard in terminal: https://wiki.archlinux.org/title/Vim
|
||||
) gvim \
|
||||
|
@ -12,8 +12,11 @@ begin
|
|||
# Add clipboard support for wayland: https://www.reddit.com/r/Fedora/comments/ax9p9t/comment/jjb4p7b/
|
||||
) vim-wayland-clipboard-git \
|
||||
wl-clipboard
|
||||
end
|
||||
|
||||
and fish "$dir/../../../Common/Software/vim/main.fish" configure
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/vim/main.fish" configure
|
||||
end
|
||||
|
||||
runInstaller $argv
|
||||
|
|
|
@ -9,8 +9,6 @@ begin
|
|||
visual-studio-code-bin (
|
||||
# Trash functionality
|
||||
) gvfs
|
||||
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
|
|
|
@ -3,10 +3,12 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW -V dir
|
||||
function installSW
|
||||
yayinst \
|
||||
zoxide
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
fish "$dir/../../../Common/Software/zoxide/main.fish" configure
|
||||
end
|
||||
|
||||
|
|
|
@ -12,23 +12,17 @@ begin
|
|||
end
|
||||
|
||||
function runInstaller -V dir -a action
|
||||
source "$dir/config.fish"
|
||||
|
||||
if [ -z "$action" ] || [ "$action" = "install" ]
|
||||
installSW $argv[2..]
|
||||
else if [ "$action" = "configure" ]
|
||||
configureSW $argv[2..]
|
||||
|
||||
source "$dir/config.fish"
|
||||
set -l users (getUsers)
|
||||
runInstaller "configure"
|
||||
|
||||
if not isConfigured || [ "$USER" != (getConfig "valhalla.setupUser.name") ]
|
||||
runInstaller userConfig
|
||||
end
|
||||
|
||||
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||
if [ "$name" != "$USER" ]
|
||||
runInstaller userConfig "$name"
|
||||
end
|
||||
end
|
||||
else if [ "$action" = "configure" ]
|
||||
configureSW $argv[2..]
|
||||
else if [ "$action" = "userConfig" ]
|
||||
set -l name $argv[2]
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
sudo virsh net-autostart default
|
||||
|
||||
|
|
|
@ -3,10 +3,6 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
source "$dir/../bash/profile.fish"
|
||||
source "$dir/../fish/profile.fish"
|
||||
|
|
|
@ -3,10 +3,6 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
begin
|
||||
printf %s\n \
|
||||
|
|
|
@ -5,7 +5,6 @@ begin
|
|||
|
||||
function installSW
|
||||
npm install --global n
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
|
|
|
@ -3,10 +3,6 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW
|
||||
set -l configFile /etc/vimrc
|
||||
set -l indicator "set clipboard"
|
||||
|
|
|
@ -3,10 +3,6 @@ begin
|
|||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
|
||||
function installSW
|
||||
configureSW
|
||||
end
|
||||
|
||||
function configureSW -V dir
|
||||
source "$dir/../bash/profile.fish"
|
||||
source "$dir/../fish/profile.fish"
|
||||
|
|
Loading…
Reference in a new issue