source: gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/prepare/06-COPY-TO-IMPORT.sh@ 37715

Last change on this file since 37715 was 37715, checked in by davidb, 12 months ago

Extra print statements added

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/bash
2
3echo 'Copying GS_Items/*_*[0-9] directories to ../import'
4
5#for full_d in Items/HMS_* ; do
6for full_d in GS_Items/*_*[0-9] ; do
7 d=${full_d##*/}
8 if [ -d ../import/$d ] ; then
9 echo " Removing pre-existing ../import/$d"
10 /bin/rm -r ../import/$d
11 fi
12
13 #echo " Copying $d"
14 #/bin/cp -r $full_d ../import/.
15
16 # Example of recursive copy that uses hardlinks for files
17 # rsync -av --link-dest="$PWD/a" a/ b
18 #
19 # For more details see (down near the bottom)
20 # https://unix.stackexchange.com/questions/202430/how-to-copy-a-directory-recursively-using-hardlinks-for-each-file
21
22 echo " Hardlink file recursive copying $d"
23 rsync -av --link-dest="$PWD/$full_d" $full_d/ ../import/$d
24
25
26done
27
28echo ""
29echo "****"
30echo "If topping up an existing set of import item files, then (unless"
31echo "existing content has really changed), then remmber to run 'touch'"
32echo "on the import/cached directory, so you don't end up running Google Vision"
33echo "on existing "
34echo ""
35echo " find ../cached -print -exec touch {} \;"
36echo "****"
37echo ""
Note: See TracBrowser for help on using the repository browser.