From 2dd1e8632eaa114d84482d3a9ca622eca56cd77e Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 4 Jan 2018 21:18:41 -0600 Subject: [PATCH] bootstrap: Use more secure temporary folder (that shit's world-readable, man) --- .local/bin/bootstrap/replicate.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.local/bin/bootstrap/replicate.sh b/.local/bin/bootstrap/replicate.sh index 2b7c7672..dee47100 100755 --- a/.local/bin/bootstrap/replicate.sh +++ b/.local/bin/bootstrap/replicate.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -git clone --recursive --separate-git-dir="$HOME/.dotfiles" git@github.com:rehashedsalt/home.git /tmp/dots -rsync -rvl --exclude ".git" /tmp/dots/ $HOME/ -rm -r /tmp/dots +tempfolder="/tmp/dots$(uuidgen)" +git clone --recursive --separate-git-dir="$HOME/.dotfiles" git@github.com:rehashedsalt/home.git $tempfolder +rsync -rvl --exclude ".git" $tempfolder/ $HOME/ +rm -r $tempfolder git submodule update --init --recursive --git-dir="$HOME/.dotfiles" --work-tree="$HOME" $HOME/