The solve-stow now backups all conflicted files

This commit is contained in:
Tim
2017-02-07 14:03:16 +01:00
committed by Tim van Veenendaal
parent c6ec8d5031
commit eae4405d5b
3 changed files with 13 additions and 26 deletions

10
solve-stow.sh Executable file
View File

@ -0,0 +1,10 @@
#! /bin/sh
stow -nv $1 2>&1 \
| sed -n 's/ \* existing target is neither a link nor a directory: //p' \
| while read i; do
echo Backup up ../$i to ../$i.back
mv ../$i ../$i.back
#rm -f ../$i
done
stow $1