aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-17 14:52:31 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-17 14:52:31 +0200
commitaee833735d45875f1703baffa21514e99118aa03 (patch)
treee0524a61de78a01ee4974a7b265ee7c41f43eb79
parent0017a2b170ec8b9d4c1ce3e3085d8984955216ff (diff)
downloaddotfiles-aee833735d45875f1703baffa21514e99118aa03.tar.gz
install.sh only update .files when needed
-rwxr-xr-xinstall.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index 0a250d0..f0229b3 100755
--- a/install.sh
+++ b/install.sh
@@ -136,7 +136,8 @@ housekeeping() {
git submodule update
#.files is used to tell scripts where to look for the dotfiles
- if yes_no "Generate '.files'?"; then
+ [ -f "$HOME/.files" ] && source "$HOME/.files"
+ if [ $DOTFILEBASE != "$(pwd)" ] && yes_no "'.files' out of date. Regenerate?"; then
echo "DOTFILEBASE=\"$(pwd)\"" > $HOME/.files
fi
}