output errors to dev null

This commit is contained in:
Josh Thomas 2022-10-25 20:45:35 -05:00
parent 03126fa118
commit 4ccc4cb44e

10
install
View file

@ -18,14 +18,14 @@ config () {
install_bare_dotfiles () {
git clone --bare https://github.com/joshuadavidthomas/dotfiles.git ${INSTALL_DIR}
mkdir -p .config-backup
config checkout -f
config checkout > /dev/null 2>&1 || true
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
else
echo "Backing up pre-existing dot files.";
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
config checkout -f
config checkout
config config status.showUntrackedFiles no
}