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