From 5935b8884af3f12f1dfef1a857cd3b1896532561 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 12 Mar 2019 14:42:48 +0100 Subject: [PATCH] Fix home files owned by root after provision --- .config/bootstrap/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/bootstrap/install.sh b/.config/bootstrap/install.sh index 79cdb92..c4d828f 100755 --- a/.config/bootstrap/install.sh +++ b/.config/bootstrap/install.sh @@ -157,16 +157,16 @@ putgitrepo() { # Downlods a gitrepo $1 and places the files in $2 only overwriti sudo -u "$name" git clone --bare "$1" "$dir/gitrepo" >/dev/null 2>&1 && sudo -u "$name" cp -rfT "$dir/gitrepo" $dfdir/.dotfiles - dotfiles $dfdir checkout + sudo -u "$name" dotfiles $dfdir checkout if [ $? = 0 ]; then echo "Checked out dotfiles."; else echo "Backing up existing dotfiles."; mkdir -p $2/.dotfiles-backup - dotfiles $dfdir checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} $2/.dotfiles-backup/{} + sudo -u "$name" dotfiles $dfdir checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} $2/.dotfiles-backup/{} fi; - dotfiles $dfdir checkout - dotfiles $dfdir config status.showUntrackedFiles no + sudo -u "$name" dotfiles $dfdir checkout + sudo -u "$name" dotfiles $dfdir config status.showUntrackedFiles no } serviceinit() { for service in "$@"; do