From fde2bf54fa5bc6f3e1dec5a0cca003d939809adb Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sat, 9 Dec 2023 15:45:17 +0100 Subject: [PATCH] Add check for new installs --- README.md | 2 +- install.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f356fd97..458dd7cd 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ git pull ./install.sh ``` ## Uninstalling -This will reset all programs to their original state and remove ~/.dotfiles completely. +This will reset all programs to their original state and remove `~/.dotfiles` completely. ```bash cd "$HOME/.dotfiles" env REMOVE_REPOSITORIES=true ./uninstall.sh diff --git a/install.sh b/install.sh index 8ac71138..83b239b1 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,11 @@ #!/bin/bash # jeremystartm's dotfiles "installer" +if [ ! -a "$HOME/.config/.jstm_dotfiles" ]; then + echo ":: Removing files" + ./uninstall.sh &> /dev/null +fi + # useful function function link() { if [ -a "${HOME}/${2}" ]; then @@ -70,6 +75,9 @@ link "konsolerc" ".config/konsolerc" link "konsole" ".local/share/konsole" link "dolphinrc" ".config/dolphinrc" +# write install file +echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles" + # check for executables if ! which qt5ct &> /dev/null; then echo ":: Warning: qt5ct is not in your PATH."