mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Don't run as root and add missing pieces
This commit is contained in:
@@ -2,13 +2,18 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
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"
|
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"
|
echo "Resetting Omarchy repository"
|
||||||
git -C "$OMARCHY_PATH" switch master
|
git clone "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null
|
||||||
git -C "$OMARCHY_PATH" reset --hard HEAD
|
rm -rf $OMARCHY_PATH
|
||||||
git -C "$OMARCHY_PATH" pull
|
mv ~/.local/share/omarchy-new $OMARCHY_PATH
|
||||||
|
|
||||||
echo "Reinstalling missing Omarchy packages"
|
echo "Reinstalling missing Omarchy packages"
|
||||||
mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$')
|
mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$')
|
||||||
@@ -19,6 +24,10 @@ if gum confirm "Are you sure you want to reinstall and lose all config changes?"
|
|||||||
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
||||||
echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null
|
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-limine
|
||||||
omarchy-refresh-plymouth
|
omarchy-refresh-plymouth
|
||||||
|
omarchy-nvim-setup
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user