Changeset 29830 for other-projects/gti/translation_status.sh
- Timestamp:
- 2015-04-02T19:35:51+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gti/translation_status.sh
r29414 r29830 1 #! 1 #!/bin/bash 2 2 3 3 # This script makes a report of any language files that have been modified via the online GTI, … … 28 28 29 29 num_modified=0 30 num_added=0 30 31 31 32 # in the lines returned from the diff, test for archives or newline … … 38 39 if [[ "$status" == *"M "* ]]; then 39 40 #echo "$file has been modified: $status" 40 echo $ file >> $report41 echo $status >> $report #echo $file >> $report 41 42 ((num_modified++)) 42 43 fi 43 44 done 44 45 45 # restore IFS46 IFS=$IFS_BAK47 IFS_BAK=48 46 49 47 if [[ $num_modified == 0 ]]; then … … 56 54 echo "---------------------------------------------" >> $report 57 55 56 # repeat, this time looking for any newly added files 57 for file in ${filelisting[@]}; do 58 status=`svn status $file` 59 if [[ "$status" == *"? "* ]]; then 60 #echo "$file has been added: $status" 61 echo $status >> $report 62 ((num_added++)) 63 fi 64 done 65 66 if [[ $num_added == 0 ]]; then 67 echo "No files added" >> $report 68 else 69 echo "" >> $report 70 echo "The above $num_added files were added." >> $report 71 fi 72 73 echo "---------------------------------------------" >> $report 74 75 # restore IFS 76 IFS=$IFS_BAK 77 IFS_BAK= 78 79 80 58 81 # if no files are modified, we don't send email, otherwise we do 59 if [[ $num_modified != 0 ]]; then60 # echo "Files were modified . Sending email..."61 cat $report | mail -s 'GTI: '$num_modified ' language file(s) on nzdl have been updated' $GREENSTONE_EMAIL82 if [[ $num_modified != 0 || $num_added != 0 ]]; then 83 # echo "Files were modified or added. Sending email..." 84 cat $report | mail -s 'GTI: '$num_modified/$num_added' language file(s) on nzdl have been updated/added' $GREENSTONE_EMAIL 62 85 echo "Sent mail of report: $report" 63 86 else
Note:
See TracChangeset
for help on using the changeset viewer.