Browse Source

poupdate: Fix the script then diff is not found

master
Andrius Štikonas 13 years ago
parent
commit
85f3e26852
  1. 18
      poupdate

18
poupdate

@ -29,6 +29,10 @@ if [ ! $MSGMERGE ]; then
exit 1
fi
if [ ! $DIFF ]; then
echo -e $RED"This program suggests the diff utility."$ENDCOLOR
fi
## Declaring Functions
function usage() {
echo "Usage `basename $0` [options] <updated-file-dir> <translations-file-tree> <translations-template-tree>"
@ -162,12 +166,22 @@ fi
# delete the Rosetta/Launchpad headers, only needed if the file was imported from Rosetta
cat $tra_tree/${trafile}.new | sed '/X-Rosetta-Export-Date/d' > $tra_tree/$trafile
if [ $DIFF ]; then
if [ "`$DIFF $tra_tree/${trafile}.old $tra_tree/${trafile}.new`" ]; then
changed_files=$(($changed_files+1))
fi
fi
rm $tra_tree/${trafile}.new
rm $tra_tree/${trafile}.old
merged_files=$(($merged_files+1))
if [ ! "$option_verbose" = "Y" ]; then
echo -ne "\r$merged_files/$total_files merged"
if [ $DIFF ] && [ ! $changed_files -eq 0 ]; then
echo -ne ", $changed_files changed"
fi
if [ ! $skipped_files -eq 0 ]; then
echo -ne ", $skipped_files skipped"
fi
@ -176,6 +190,10 @@ fi
done
echo -ne $BLUE"\r$merged_files/$total_files merged"$ENDCOLOR
if [ $DIFF ] && [ ! $changed_files -eq 0 ]; then
echo -ne $BLUE", $changed_files changed"$ENDCOLOR
fi
if [ ! $skipped_files -eq 0 ]; then
echo -ne $BLUE", $skipped_files skipped"$ENDCOLOR
fi

Loading…
Cancel
Save