]> gitweb.fluxo.info Git - rhatto/apps.git/commitdiff
Inception: ensure backup folder exists
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 4 Jan 2018 16:13:46 +0000 (14:13 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 4 Jan 2018 16:13:46 +0000 (14:13 -0200)
inception

index 3bb9d782a23ec134d5aa3a572cc321844c95000c..a5e4c5ff939e279d7f7b4b63d6bf628b261cc6a1 100755 (executable)
--- a/inception
+++ b/inception
@@ -34,8 +34,9 @@ function inception_init {
     # once the integrity of the apps repo is checked
     if [ -e "$HOME/.dotfiles" ]; then
        if [ ! -h "$HOME/.dotfiles" ] || [ "`readlink $HOME/.dotfiles`" != "apps/dotfiles" ]; then
-        mv $HOME/.dotfiles $BACKUPS/
-        ( cd $HOME && ln -s $HOME/apps/dotfiles .dotfiles )
+         mkdir -p $BACKUPS
+         mv $HOME/.dotfiles $BACKUPS/
+         ( cd $HOME && ln -s $HOME/apps/dotfiles .dotfiles )
       fi
     fi