From: Silvio Rhatto Date: Thu, 4 Jan 2018 16:13:46 +0000 (-0200) Subject: Inception: ensure backup folder exists X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1cc320cfea23be43afb2bfe63f6729ee0ed29315;p=rhatto%2Fapps.git Inception: ensure backup folder exists --- diff --git a/inception b/inception index 3bb9d78..a5e4c5f 100755 --- 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