diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-01-28 11:10:26 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-01-28 11:10:26 -0200 |
commit | bd23f3afb6238175924be485d77dedca381d278c (patch) | |
tree | 01ddde5a49071aeb1c54567f2bba7d9bf63abaa6 /infection | |
parent | 1fc87da3cee3fef248fe7c7d92cb77dbcf47cb5e (diff) | |
download | inception-bd23f3afb6238175924be485d77dedca381d278c.tar.gz inception-bd23f3afb6238175924be485d77dedca381d278c.tar.bz2 |
Updates inception
Diffstat (limited to 'infection')
-rwxr-xr-x | infection | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -32,14 +32,16 @@ function infection_init { # # This way we can easily check the integrity of our dotfiles # once the integrity of the apps repo is checked - if [ -e "$HOME/.dotfiles" ]; then - if [ ! -h "$HOME/.dotfiles" ] || [ "`readlink $HOME/.dotfiles`" != "apps/dotfiles" ]; then - mkdir -p $BACKUPS - mv $HOME/.dotfiles $BACKUPS/ - ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles ) + if [ -e "$HOME/apps/dotfiles" ]; then + if [ -e "$HOME/.dotfiles" ]; then + if [ ! -h "$HOME/.dotfiles" ] || [ "`readlink $HOME/.dotfiles`" != "apps/dotfiles" ]; then + mkdir -p $BACKUPS + mv $HOME/.dotfiles $BACKUPS/ + ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles ) + fi + else + ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles ) fi - else - ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles ) fi #if [ ! -e "$HOME/.dotfiles" ]; then |