Changeset 3830 for trunk/LMDZ.COMMON/makelmdz_fcm
- Timestamp:
- Jul 4, 2025, 12:06:05 PM (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/makelmdz_fcm
r3796 r3830 606 606 607 607 # Path and name of the file containing the difference result 608 res_file=" version_stat-diff.txt"608 res_file="pgrm_version_details.txt" 609 609 610 610 # Get the current date … … 679 679 SUBROUTINE print_version_info() 680 680 681 write(*,'(a)') '======= Compilation details =======' 682 write(*,'(a)') '-> Date: ${current_date}' 683 write(*,'(a)') '-> Command: ${compilation_command}' 684 write(*,*) 681 integer, parameter :: io_unit = 10 682 683 open(io_unit, file = '${res_file}',status = 'replace',action = 'write') 684 685 write(*,'(a)') '-> Writing compilation details to the file "${res_file}".' 686 write(io_unit,'(a)') '========================= COMPILATION DETAILS ==========================' 687 write(io_unit,'(a)') '-> Date: ${current_date}' 688 write(io_unit,'(a)') '-> Command: ${compilation_command}' 689 write(io_unit,*) 685 690 EOF 686 691 687 692 if [ -n "$vcs_info" ]; then 688 echo "write(*,'(a)') '=== Version Control Information ==='" >> "$info_file" 693 echo "write(*,'(a)') '-> Writing information result to the file \"${res_file}\".'" >> "$info_file" 694 echo "write(io_unit,'(a)') '===================== VERSION CONTROL INFORMATION ======================'" >> "$info_file" 689 695 while IFS= read -r line; do 690 echo "write( *,'(a)') '${line}'" >> "$info_file"696 echo "write(io_unit,'(a)') '${line}'" >> "$info_file" 691 697 done <<< "$(echo -e "$vcs_info")" 692 698 else 693 echo "write( *,'(a)') '==== No version control system===='" >> "$info_file"699 echo "write(io_unit,'(a)') '====================== NO VERSION CONTROL SYSTEM ======================='" >> "$info_file" 694 700 fi 695 701 696 702 if [ -n "$vcs_stat" ]; then 697 echo "write(*,*)" >> "$info_file"698 echo "write(*,'(a)') '====== Version Control Status ====='" >> "$info_file"699 703 echo "write(*,'(a)') '-> Writing status result to the file \"${res_file}\".'" >> "$info_file" 700 echo "open(unit = 1, file = \"${res_file}\",status = 'replace',action = 'write')" >> "$info_file" 704 echo "write(io_unit,*)" >> "$info_file" 705 echo "write(io_unit,'(a)') '======================== VERSION CONTROL STATUS ========================'" >> "$info_file" 701 706 while IFS= read -r line; do 702 echo "write( 1,'(a)') '${line}'" >> "$info_file"707 echo "write(io_unit,'(a)') '${line}'" >> "$info_file" 703 708 done <<< "$(echo -e "$vcs_stat")" 704 echo "close(1)" >> "$info_file"705 709 fi 706 710 707 711 if [ -n "$vcs_diff" ]; then 708 echo "write(*,*)" >> "$info_file"709 echo "write(*,'(a)') '====== Version Control Diff ======='" >> "$info_file"710 712 echo "write(*,'(a)') '-> Writing diff result to the file \"${res_file}\".'" >> "$info_file" 711 echo "open(unit = 1, file = \"${res_file}\",status = 'unknown',position = 'append',action = 'write')" >> "$info_file" 713 echo "write(io_unit,*)" >> "$info_file" 714 echo "write(io_unit,'(a)') '========================= VERSION CONTROL DIFF ========================='" >> "$info_file" 712 715 while IFS= read -r line; do 713 echo "write( 1,'(a)') '${line}'" >> "$info_file"716 echo "write(io_unit,'(a)') '${line}'" >> "$info_file" 714 717 done <<< "$(echo -e "$vcs_diff")" 715 echo "close(1)" >> "$info_file"716 718 fi 717 719 718 720 cat << EOF >> "$info_file" 719 write(*,'(a)') '===================================' 721 write(io_unit,'(a)') '========================================================================' 722 723 close(io_unit) 720 724 721 725 END SUBROUTINE print_version_info
Note: See TracChangeset
for help on using the changeset viewer.