diff --git a/README.md b/README.md index 9f88b0a..fd273b1 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ sudo ln -s ~/Projects/useful-bash-scripts/mark-for-comparison /usr/local/bin/mar sudo ln -s ~/Projects/useful-bash-scripts/compare-with-marked /usr/local/bin/compare-with-marked sudo ln -s ~/Projects/useful-bash-scripts/is-marked /usr/local/bin/is-marked sudo ln -s ~/Projects/useful-bash-scripts/copy-to-dbupdate /usr/local/bin/copy-to-dbupdate +sudo ln -s ~/Projects/useful-bash-scripts/svn-repair-move /usr/local/bin/svn-repair-move ``` #### Nemo actions diff --git a/svn-repair-move b/svn-repair-move new file mode 100755 index 0000000..2298f9f --- /dev/null +++ b/svn-repair-move @@ -0,0 +1,24 @@ +#!/bin/bash +# title: svn-repair-move +# description: Performs an SVN repair move +# parameter #1: source file +# parameter #2: target file + +# Variables +source="$1" +target="$2" + +# Error checks +if [[ ! -f $source ]]; then + echo "Source must be a file..." + exit 1 +fi + +if [[ ! -f $target ]]; then + echo "Target must be a file..." + exit 1 +fi + +# Execution +mv $target $source +svn mv $source $target