Changeset 28081
- Timestamp:
- 2013-08-16T20:04:02+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/gen-model-colls.sh
r28074 r28081 100 100 } 101 101 102 # model-collect>svn -R propset svn:ignore -F .customignore . 103 # where .customignore is a file containing: 104 # log 105 # earliestDatestamp 106 # cache 107 # model-collect>svn proplist -v 108 # shows the svn properties, including the svn:ignore property. So it shows what files svn will ignore 102 109 function svn_add_new_collection () { 103 110 … … 112 119 fi 113 120 114 find collect/$collection -name ".svn" -type d -exec rm -rf {} \; 115 cp -r collect/$collection model-collect/$collection 116 svn add model-collect/$collection 121 # Using rsync to copy folders while excluding files/subfolders, BUT rsync is not available on lsb 122 # http://www.linuxquestions.org/questions/linux-software-2/copy-svn-working-dir-without-svn-hidden-dirs-and-files-620586/ 123 # See also http://www.thegeekstuff.com/2011/01/rsync-exclude-files-and-folders/, 124 # section "Exclude multiple files and directories at the same time" (can also use a file to blacklist folders/files) 125 126 # need slash on end of src dir collect/$collection/ ! 127 rsync -r --exclude=.svn/ --exclude=log/ --exclude=cache/ --exclude=earliestDatestamp collect/$collection/ model-collect/$collection 128 129 # find collect/$collection -name ".svn" -type d -exec rm -rf {} \; 130 # cp -r collect/$collection model-collect/$collection 131 132 # http://www.thegeekstuff.com/2010/06/bash-array-tutorial/ 133 # ignorelist=('log' 'cache' 'archives/earliestDatestamp'); 134 # for ignored in "${ignorelist[@]}"; do 135 # if [ -f model-collect/$collection/$ignorelist ]; then 136 # rm model-collect/$collection/$ignorelist 137 # elif [ -d model-collect/$collection/$ignorelist ]; then 138 # rm -rf model-collect/$collection/$ignorelist 139 # fi 140 # done 141 142 svn add --force model-collect/$collection 143 144 # http://stackoverflow.com/questions/15880249/subclipse-svn-first-commit-ignore-certain-directories 145 # http://wolfram.kriesing.de/blog/index.php/2005/svnignore-and-svnkeywords 146 # http://boblet.tumblr.com/post/35755799/setting-up-and-using-svn-ignore-with-subversion 147 # http://www.petefreitag.com/item/662.cfm 148 # http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.ignore.html 149 # http://stackoverflow.com/questions/116074/how-to-ignore-a-directory-with-svn 150 151 # Dr Bainbridge's way of doing an svn ignore is better and involves fewer steps: 152 # create the empty collection folder (-p for subcollections), svn add it, 153 # svn:ignore all the files to be ignored 154 # copy the contents of the collection across, 155 # do an svn add --force on the collection folder 156 157 #mkdir -p model-collect/$collection 158 #svn add model-collect/$collection 159 #ignorelist=('log' 'cache' 'archives/earliestDatestamp'); 160 #for ignored in "${ignorelist[@]}"; do 161 # svn propset svn:ignore $ignorelist model-collect/$collection/. 162 #done 163 # cp -r collect/$collection/* model-collect/$collection/* 164 #svn add --force model-collect/$collection 117 165 } 118 166 … … 228 276 cp -r collect/$collection/index model-collect/$collection/. 229 277 278 # need a --force to skip all the svn:ignored files (archives/earliestDatestamp) 279 # when doing the recursive svn add on the archives and index directories 230 280 if [ "$debug_mode" -eq "0" ]; then 231 svn add model-collect/$collection/archives232 svn add model-collect/$collection/index281 svn add --force model-collect/$collection/archives 282 svn add --force model-collect/$collection/index 233 283 fi 234 284 } … … 308 358 # now svn add any and all the NEW items in model-collect's archives and index 309 359 # see http://stackoverflow.com/questions/1071857/how-do-i-svn-add-all-unversioned-files-to-svn 360 # see also http://stackoverflow.com/questions/116074/how-to-ignore-a-directory-with-svn 310 361 # if [ "$debug_mode" -eq "0" ]; then 311 362 svn add --force model-collect/$collection/archives/* --auto-props --parents --depth infinity -q … … 491 542 fi 492 543 544 # Not using rsync to copy folders while excluding files/subfolders, since rsync is not available on lsb 545 # http://www.linuxquestions.org/questions/linux-software-2/copy-svn-working-dir-without-svn-hidden-dirs-and-files-620586/ 546 # rsync -r --exclude=.svn/ model-collect/ collect 547 493 548 # Make a copy of the model-collect named as the new collect 494 549 # (or if collections are specified in the cmdline arguments, copy just these over from model-collect into collect) … … 601 656 echo "* The model-collect folder has not been altered. Changes have only been made to collect" 602 657 elif [ "x$mode" == "xsvnupdate" ]; then 603 echo "* TO DO: You still need to run svn status and thensvn commit on the model-collect folder. Besides that:"658 echo "* TO DO: You still need to run svn status and svn commit on the model-collect folder. Besides that:" 604 659 elif [ "x$mode" == "xsvndelete" ]; then 605 660 echo "* The model-collect folder's archives and index subfolders have been updated and committed to svn." 606 661 elif [ "x$mode" == "xsvnaddnew" ]; then 607 662 echo "* The new collection(s) have been built, copied to model-collect and added to svn." 663 echo "* TO DO: You still need to run svn status and svn commit on the model-collect folder. Besides that:" 608 664 fi 609 665 echo
Note:
See TracChangeset
for help on using the changeset viewer.