diff --git a/poupdate b/poupdate index b244694..177b6ef 100755 --- a/poupdate +++ b/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] " @@ -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