Ignore:
Timestamp:
Jan 20, 2025, 10:31:40 AM (6 months ago)
Author:
jbclement
Message:

Mars PCM:

  • Albedo is now set properly in every situation given the presence of CO2/H2O ice and frost + water albedo is done solely in "physiq".
  • Small update to make the display of code version status/diff clearer.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/makelmdz_fcm

    r3578 r3586  
    611611vcs_info=""
    612612vcs_diff=""
    613 vcs_status=""
     613vcs_stat=""
    614614for dir in "$LMDGCM/.."/*; do
    615615    # Skip if it is not a directory or the name contains "git" or "svn"
     
    619619    # Determine the version control system for each subdirectory
    620620    if command -v svn > /dev/null && svn info "$dir" > /dev/null 2>&1; then # SVN
    621         vcs_info+="\n=== SVN Information for $(basename "$dir") ===\n$(svn info "$dir")\n"
    622         vcs_diff+="\n=== SVN Diff for $(basename "$dir") ===\n$(svn diff "$dir")\n"
    623         vcs_status+="\n=== SVN Status for $(basename "$dir") ===\n$(svn status "$dir")\n"
     621        vcs_info+="\n-> SVN Information for \"$(basename "$dir")\"\n$(svn info "$dir")\n"
     622        vcs_diff+="\n-> SVN Diff for \"$(basename "$dir")\"\n$(svn diff "$dir")\n"
     623        vcs_stat+="\n-> SVN Status for \"$(basename "$dir")\"\n$(svn status "$dir")\n"
    624624    elif command -v git > /dev/null && git -C "$dir" rev-parse --is-inside-work-tree > /dev/null 2>&1; then # Git
    625         vcs_info+="=== Git Information for $(basename "$dir") ===\n$(git -C "$dir" log -1 --pretty=format:"%H%n%an%n%ad%n%s")\n"
    626         vcs_diff+="\n=== Git Diff for $(basename "$dir") ===\n$(git -C "$dir" diff)\n"
    627         vcs_status+="\n=== Git Status for $(basename "$dir") ===\n$(git -C "$dir" status --short)\n"
     625        vcs_info+="-> Git Information for \"$(basename "$dir")\"\n$(git -C "$dir" log -1 --pretty=format:"%H%n%an%n%ad%n%s")\n"
     626        vcs_diff+="\n-> Git Diff for \"$(basename "$dir")\"\n$(git -C "$dir" diff)\n"
     627        vcs_stat+="\n-> Git Status for \"$(basename "$dir")\"\n$(git -C "$dir" status --short)\n"
    628628    else # None
    629         vcs_info+="\n=== No version control system for $(basename "$dir") ===\n"
     629        vcs_info+="\n-> No version control system for \"$(basename "$dir")\"\n"
    630630    fi
    631631done
     
    659659
    660660write(*,'(a)') '======= Compilation details ======='
    661 write(*,'(a)') '> Date: ${current_date}'
    662 write(*,'(a)') '> Command: ${compilation_command}'
     661write(*,'(a)') '-> Date: ${current_date}'
     662write(*,'(a)') '-> Command: ${compilation_command}'
    663663write(*,*)
    664664EOF
     
    670670    done <<< "$(echo -e "$vcs_info")"
    671671else
    672     echo "write(*,'(a)') '=== No version control system ==='" >> "$info_file"
    673 fi
    674 
    675 if [ -n "$vcs_status" ]; then
     672    echo "write(*,'(a)') '==== No version control system ===='" >> "$info_file"
     673fi
     674
     675if [ -n "$vcs_stat" ]; then
    676676    echo "write(*,*)" >> "$info_file"
    677     echo "write(*,'(a)') '=== Version Control Status ==='" >> "$info_file"
    678     echo "write(*,'(a)') '> Writing status result to the file \"${res_file}\".'" >> "$info_file"
     677    echo "write(*,'(a)') '====== Version Control Status ====='" >> "$info_file"
     678    echo "write(*,'(a)') '-> Writing status result to the file \"${res_file}\".'" >> "$info_file"
    679679    echo "open(unit = 1, file = \"${res_file}\",status = 'replace',action = 'write')" >> "$info_file"
    680680    while IFS= read -r line; do
    681681        echo "write(1,'(a)') '${line//\'/\'\'}'" >> "$info_file"
    682     done <<< "$(echo -e "$vcs_status")"
     682    done <<< "$(echo -e "$vcs_stat")"
    683683    echo "close(1)" >> "$info_file"
    684684fi
     
    687687    echo "write(*,*)" >> "$info_file"
    688688    echo "write(*,'(a)') '====== Version Control Diff ======='" >> "$info_file"
    689     echo "write(*,'(a)') '> Writing diff result to the file \"${res_file}\".'" >> "$info_file"
     689    echo "write(*,'(a)') '-> Writing diff result to the file \"${res_file}\".'" >> "$info_file"
    690690    echo "open(unit = 1, file = \"${res_file}\",status = 'unknown',position = 'append',action = 'write')" >> "$info_file"
    691691    while IFS= read -r line; do
Note: See TracChangeset for help on using the changeset viewer.