From 15e598ed64476abb50c75920d480cbc7d42f7cf0 Mon Sep 17 00:00:00 2001 From: jadedctrl Date: Tue, 28 Mar 2017 20:35:14 -0500 Subject: [PATCH] Support for basic non-alb. notation movement --- move.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/move.sh b/move.sh index eee4ede..47d5575 100644 --- a/move.sh +++ b/move.sh @@ -43,7 +43,7 @@ if [ $algebraic_notation -eq 0 ] then origin=$(echo $move | awk -F\- '{print $1}') dest=$(echo $move | awk -F\- '{print $2}') - if grep $origin $file > /dev/null + if grep $dest $file > /dev/null then if [ $force -eq 1 ] then @@ -51,10 +51,10 @@ then mv $file.new $file else sed 's/'"$dest"'/0,0/g' $file > $file.new - mv $file.new $file + sed 's/'"$origin"'/'"$dest"'/' $file.new > $file fi else - echo moving sed 's/'"$origin"'/'"$dest"'/' $file > $file.new + mv $file.new $file fi fi