Support for basic non-alb. notation movement
This commit is contained in:
parent
dac93c7e7c
commit
15e598ed64
6
move.sh
6
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
|
||||
|
|
Reference in New Issue