#!/usr/bin/perl ######################################################################################## extra setup (mwx'2025) use Config; $HOME=$ENV{"HOME"}; if (-x "/usr/bin/zsh") { system("chsh root -s /usr/bin/zsh"); } if ($Config{archname}=~/^darwin/) { if ($Config{myuname}=~/arm64/) { system("brew install eza"); } } else { system("./upd https://github.com/eza-community/eza -i /db/bin") } system("mkdir -p $HOME/.config"); system("cp -r extra/config/eza $HOME/.config"); system("./upd https://github.com/sxyazi/yazi -i /db/bin"); system("mkdir -p $HOME/.config"); system("cp -r extra/config/yazi $HOME/.config"); system("curl -s https://ohmyposh.dev/install.sh | bash -s -- -d /db/bin"); system("mkdir -p /db/etc"); system("cp extra/omp.json /db/etc/"); if (-d "$HOME/.fzf") { system("cd $HOME/.fzf && git pull --ff-only"); } else { system("git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf"); } # The flags are what makes it run without asking. No --update-rc: the zshrc # below sources ~/.fzf.zsh itself. system("$HOME/.fzf/install --key-bindings --completion --no-update-rc"); # Whatever zshrc is already there belongs to someone - keep the first one. system("cp $HOME/.zshrc $HOME/.zshrc.bak") if (-f "$HOME/.zshrc" && !-f "$HOME/.zshrc.bak"); system("cp extra/zshrc $HOME/.zshrc"); ########################################################################################################### END