Changeset 4586 for palm/trunk/SCRIPTS/document_changes
- Timestamp:
- Jul 1, 2020 4:16:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/document_changes
r4481 r4586 3 3 # This file is part of the PALM model system. 4 4 # 5 # PALM is free software: you can redistribute it and/or modify it under the 6 # terms of the GNU General Public License as published by the Free Software 7 # Foundation, either version 3 of the License, or (at your option) any later 5 # PALM is free software: you can redistribute it and/or modify it under the 6 # terms of the GNU General Public License as published by the Free Software 7 # Foundation, either version 3 of the License, or (at your option) any later 8 8 # version. 9 9 # … … 20 20 # Current revisions: 21 21 # ----------------- 22 # 23 # 22 # 23 # 24 24 # Former revisions: 25 25 # ----------------- 26 26 # $Id$ 27 # Do not add whitespaces at current-revision section 28 # 29 # 4481 2020-03-31 18:55:54Z maronga 27 30 # Bugfix for copyright updates 28 # 31 # 29 32 # 4370 2020-01-10 14:00:44Z raasch 30 33 # script made bash compatible 31 # 34 # 32 35 # 3665 2019-01-10 08:28:24Z raasch 33 36 # Corrected "Former revisions" section 34 # 37 # 35 38 # 2696 2017-12-14 17:12:51Z kanani 36 39 # Change in file header (GPL part) … … 39 42 # Changed the submission procedure in order to reduce the number of required 40 43 # commits to one per change. 41 # 44 # 42 45 # 2117 2017-01-16 16:28:44Z maronga 43 # 46 # 44 47 # 1827 2016-04-07 12:12:23Z maronga 45 48 # Added note that the script does not work on MAC OS 46 # 49 # 47 50 # 1813 2016-04-06 09:38:56Z maronga 48 51 # Added update of the copyright statements in the file headers. 49 # 52 # 50 53 # 1810 2016-04-05 20:25:29Z maronga 51 54 # document_changes now checks all subdirectories. Modified printing to screen. 52 # 55 # 53 56 # 1804 2016-04-05 16:30:18Z maronga 54 57 # Removed printing of "this is an alpha version" 55 # 58 # 56 59 # 1326 2014-03-21 10:44:31Z maronga 57 60 # Initial revision 58 # 61 # 59 62 # Description: 60 63 # ------------ … … 105 108 input_dir=`pwd` 106 109 fi 107 110 108 111 printf "\n" 109 112 printf "#------------------------------------------------------------------------# \n" … … 111 114 printf "| | \n" 112 115 printf "| This tool moves the change comments in the all PALM file headers from | \n" 113 printf "| 'Current revisions' to 'Former revisions' and saves the time stamp. | \n" 116 printf "| 'Current revisions' to 'Former revisions' and saves the time stamp. | \n" 114 117 printf "#------------------------------------------------------------------------# \n" 115 118 116 119 printf "\n *** Checking files in $input_dir and all recursive subdirectories...\n" 117 120 118 121 119 122 # 120 123 #-- scan all (sub-)directories for files. … … 134 137 continue 135 138 fi 136 139 137 140 (( count_files = count_files + 1 )) 138 141 … … 179 182 then 180 183 181 182 printf "\r%$(tput cols)s" " " 184 185 printf "\r%$(tput cols)s" " " 183 186 printf "\r \e[1;92m*** Comments found in $fn\e[0m\n" 184 187 185 188 found_comment=true 186 189 cp $fn $fn~ … … 195 198 fi 196 199 fi 197 200 198 201 # 199 202 #-- get the timestamp from the current revision … … 204 207 timestamp_string="$comment_char $timestamp" 205 208 fi 206 209 207 210 done <"$fn" 208 211 … … 210 213 # 211 214 #-- check for updates of the copyright statement 212 while read line 213 do 215 while read line 216 do 214 217 215 218 line_tmp="" 216 line_tmp2="" 219 line_tmp2="" 217 220 line_tmp=${line:22:29} 218 221 line_tmp2=${line:2:10} … … 226 229 if [[ "$year_in_file2" != "$current_year" ]] 227 230 then 228 printf "\r%$(tput cols)s" " " 231 printf "\r%$(tput cols)s" " " 229 232 printf "\r \e[1;33m*** Copyright update required in $fn\e[0m\n" 230 233 … … 240 243 done <"$fn" 241 244 242 printf "\r%$(tput cols)s" " " 245 printf "\r%$(tput cols)s" " " 243 246 printf "\r\e[1m *** Searched files: $count_files. Comments found: $count_changes. Copyright updates found: $count_updates\e[0m" 244 247 … … 257 260 #-- fix old time stamp 258 261 (( line_time = line_stop + 2 )) 259 sed -i "${line_time}d" $fn 262 sed -i "${line_time}d" $fn 260 263 sed -i "${line_time}i$timestamp_string" $fn 261 264 … … 273 276 list_delete=${list_delete#?} 274 277 sed -i "$list_delete" $fn 275 sed -i "${line_start}i${comment_char} 276 sed -i "${line_start}i${comment_char} 278 sed -i "${line_start}i${comment_char}" $fn 279 sed -i "${line_start}i${comment_char}" $fn 277 280 278 281 fi … … 288 291 then 289 292 printf " *** You can now proceed with\n \e[0;91msvn commit -m 'your commit message' trunk\e[0m\n" 290 printf " *** Please do not forget to commit your changes in the changelog at\n \e[0;91mhttps://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog\e[0m!\n" 293 printf " *** Please do not forget to commit your changes in the changelog at\n \e[0;91mhttps://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog\e[0m!\n" 291 294 else 292 printf " *** No comments found in files!\n" 293 295 printf " *** No comments found in files!\n" 296 294 297 fi
Note: See TracChangeset
for help on using the changeset viewer.