mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Extract the rest of the reinstall flow into separate parts
This commit is contained in:
@@ -1,33 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# Attempt to reinstall all default Omarchy packages and reset all the default configs.
|
# Attempt to reinstall all default Omarchy packages and reset all the default configs.
|
||||||
|
|
||||||
set -e
|
echo -e "This will reinstall all the default Omarchy packages and reset all default configs.\nWarning: All user changes to configs will be lost.\n"
|
||||||
|
|
||||||
if [ "$EUID" -eq 0 ]; then
|
|
||||||
echo "Error: This script should not be run as root"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "This will reinstall all the default Omarchy packages and reset all default configs.\nWarning: All changes to configs will be lost.\n"
|
|
||||||
|
|
||||||
if gum confirm "Are you sure you want to reinstall and lose all config changes?"; then
|
if gum confirm "Are you sure you want to reinstall and lose all config changes?"; then
|
||||||
echo "Resetting Omarchy repository"
|
omarchy-reinstall-git
|
||||||
git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
|
||||||
rm -rf $OMARCHY_PATH
|
|
||||||
mv ~/.local/share/omarchy-new $OMARCHY_PATH
|
|
||||||
|
|
||||||
omarchy-reinstall-pkgs
|
omarchy-reinstall-pkgs
|
||||||
|
omarchy-reinstall-configs
|
||||||
echo "Resetting all Omarchy configs"
|
|
||||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
|
||||||
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
|
||||||
echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null
|
|
||||||
|
|
||||||
$(bash $OMARCHY_PATH/install/config/theme.sh)
|
|
||||||
$(bash $OMARCHY_PATH/install/config/git.sh)
|
|
||||||
|
|
||||||
omarchy-refresh-limine
|
|
||||||
omarchy-refresh-plymouth
|
|
||||||
omarchy-nvim-setup
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
20
bin/omarchy-reinstall-configs
Executable file
20
bin/omarchy-reinstall-configs
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Overwrite all user configs with the Omarchy defaults.
|
||||||
|
|
||||||
|
if [ "$EUID" -eq 0 ]; then
|
||||||
|
echo "Error: This script should not be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Resetting all Omarchy configs"
|
||||||
|
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||||
|
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
||||||
|
echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null
|
||||||
|
|
||||||
|
$(bash $OMARCHY_PATH/install/config/theme.sh)
|
||||||
|
|
||||||
|
omarchy-refresh-limine
|
||||||
|
omarchy-refresh-plymouth
|
||||||
|
omarchy-nvim-setup
|
||||||
8
bin/omarchy-reinstall-git
Executable file
8
bin/omarchy-reinstall-git
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Reinstall the Omarchy configuration directory from the git source.
|
||||||
|
|
||||||
|
git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||||
|
mv $OMARCHY_PATH ~/.local/share/omarchy-old
|
||||||
|
mv ~/.local/share/omarchy-new $OMARCHY_PATH
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Attempt to reinstall all default Omarchy packages and reset all the default configs.
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Reinstalling missing Omarchy packages from stable repository"
|
# Reinstall all default Omarchy packages from the stable channel and downgrade any packages that are too new.
|
||||||
|
|
||||||
# Set the package repository to the stable mirrors
|
# Set the package repository to the stable mirrors
|
||||||
omarchy-refresh-pacman
|
omarchy-refresh-pacman
|
||||||
|
|||||||
Reference in New Issue
Block a user