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
|
then
|
||||||
origin=$(echo $move | awk -F\- '{print $1}')
|
origin=$(echo $move | awk -F\- '{print $1}')
|
||||||
dest=$(echo $move | awk -F\- '{print $2}')
|
dest=$(echo $move | awk -F\- '{print $2}')
|
||||||
if grep $origin $file > /dev/null
|
if grep $dest $file > /dev/null
|
||||||
then
|
then
|
||||||
if [ $force -eq 1 ]
|
if [ $force -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -51,10 +51,10 @@ then
|
||||||
mv $file.new $file
|
mv $file.new $file
|
||||||
else
|
else
|
||||||
sed 's/'"$dest"'/0,0/g' $file > $file.new
|
sed 's/'"$dest"'/0,0/g' $file > $file.new
|
||||||
mv $file.new $file
|
sed 's/'"$origin"'/'"$dest"'/' $file.new > $file
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo moving
|
|
||||||
sed 's/'"$origin"'/'"$dest"'/' $file > $file.new
|
sed 's/'"$origin"'/'"$dest"'/' $file > $file.new
|
||||||
|
mv $file.new $file
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Reference in New Issue