mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add omarchy-reinstall command to bring back screwed up systems
This commit is contained in:
18
bin/omarchy-reinstall
Executable file
18
bin/omarchy-reinstall
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if gum confirm "Are you sure you want to reinstall all base packages and reset all default configs?"; then
|
||||
# Reinstall all base packages
|
||||
mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$')
|
||||
sudo pacman -Syu --noconfirm "${packages[@]}"
|
||||
|
||||
# Copy over Omarchy configs
|
||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||
|
||||
# Use default bashrc from Omarchy
|
||||
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
||||
|
||||
# Reset any conflict from bad .bash_profile
|
||||
echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" | tee ~/.bash_profile
|
||||
fi
|
||||
Reference in New Issue
Block a user