Removed hypothetical alg. notation support
This commit is contained in:
parent
3a0a3bc2cd
commit
c9247b0452
9
move.sh
9
move.sh
|
@ -8,15 +8,10 @@
|
|||
#####################
|
||||
|
||||
na=0
|
||||
algebraic_notation=0
|
||||
force=0
|
||||
for argument in $@
|
||||
do
|
||||
case $argument in
|
||||
-a)
|
||||
na=1
|
||||
algebraic_notation=1
|
||||
;;
|
||||
-f)
|
||||
force=1
|
||||
;;
|
||||
|
@ -28,7 +23,6 @@ do
|
|||
else
|
||||
if echo $argument | grep "," > /dev/null
|
||||
then
|
||||
algebraic_notation=0
|
||||
move=$argument
|
||||
else
|
||||
file=$argument
|
||||
|
@ -39,8 +33,6 @@ do
|
|||
done
|
||||
|
||||
|
||||
if [ $algebraic_notation -eq 0 ]
|
||||
then
|
||||
origin=$(echo $move | awk -F\- '{print $1}')
|
||||
dest=$(echo $move | awk -F\- '{print $2}')
|
||||
if grep $dest $file > /dev/null
|
||||
|
@ -57,4 +49,3 @@ then
|
|||
sed 's/'"$origin"'/'"$dest"'/' $file > $file.new
|
||||
mv $file.new $file
|
||||
fi
|
||||
fi
|
||||
|
|
Reference in New Issue