Changeset 12508
- Timestamp:
- 2020-03-04T17:00:49+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/CI/sette_ticket2304/all_functions.sh
r12505 r12508 95 95 if [ ${SYNC_CONFIGS} == "yes" ]; then 96 96 97 echo '-------------------------------------------------------------------------------' 98 echo ' SOURCE AND CONFIG FILES SYNCHRONISATION ' 99 echo '' 97 100 echo "configuration $3/$2 will be synchronised with $3/$1" 101 echo '' 98 102 99 103 lREF=$3/$1 # reference … … 107 111 # Manage case number of file in MY_SRC changes 108 112 # find number of file only in $lCFG/MY_SRC 109 FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep $lCFG/MY_SRC| awk '{print $4}'`113 FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}'` 110 114 111 115 # if more than 0, trigger a cleaning as Makenemo do not properly manage this case. … … 113 117 echo '' 114 118 echo "$lCFG contains a different file list than $lREF :" 115 diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep $lCFG/MY_SRC| awk '{print $4}'119 diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}' 116 120 echo "Synchronisation is not enough because Makenemo does not handle well case where a file in MY_SRC is removed" 117 121 echo "Therefore, we need to clean $lCFG before starting runing it" … … 123 127 # synchronisation $lREF/MY_SRC directory (and delete file in target location if needed) 124 128 rsync -av --delete $lREF/MY_SRC/ $lCFG/MY_SRC 129 130 # rsync keep preserve the modification time stamp. 131 # To avoid case where a file in MY_SRC is replace by an older file, we touch the file 132 touch $lCFG/MY_SRC/* 125 133 fi 126 134 127 135 # synchronize EXPREF 128 136 if [ -d $lREF/EXPREF ] && [ -d $lCFG/EXP00 ] ; then 129 rsync $lREF/EXPREF/*namelist*_cfg $lCFG/EXP00/. 130 rsync $lREF/EXPREF/iodef.xml $lCFG/EXP00/. 131 rsync $lREF/EXPREF/*context_*.xml $lCFG/EXP00/. 132 rsync $lREF/EXPREF/file_def_*.xml $lCFG/EXP00/. 137 rsync -aq --no-links $lREF/EXPREF/ $lCFG/EXP00/. 133 138 fi 134 139 echo '-------------------------------------------------------------------------------' 135 140 fi 136 141 } … … 142 147 lCFG=$2 143 148 lTYP=$3 149 echo '' 150 echo '-------------------------------------------------------------------------------' 151 echo ' CLEANING CONFIGURATION ' 152 echo '' 153 echo "./makenemo -n $lCFG -a/-r $lREF clean" 154 echo '' 144 155 if [ ${lTYP} == 'tests' ]; then 145 156 ./makenemo -n $lCFG -a $lREF clean … … 152 163 echo "$lCFG configuration has been cleaned" 153 164 echo '' 165 echo '-------------------------------------------------------------------------------' 154 166 fi 155 167 }
Note: See TracChangeset
for help on using the changeset viewer.