76afcc3b47b9fd97dc55ac693b4449656fa18d11
[git-annex.git] /
1 [[!comment format=mdwn
2  username="yarikoptic"
3  avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4"
4  subject="comment 3"
5  date="2020-10-06T01:26:59Z"
6  content="""
7 I think it worked wonderfully
8
9 <details>
10 <summary>here is my script I have tried</summary> 
11
12 ```shell
13 #!/bin/bash
14
15 export PS4='> '
16 set -x
17 set -eu
18 cd \"$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)\"
19
20 mkdir d-in d-repo 
21 echo content >| d-in/file 
22
23 function dance() {
24     git annex import master --from d-in
25     # but we need to merge it
26     git merge d-in/master
27     ls -l
28     grep -e . *
29 }
30
31
32 cd d-repo 
33 git init
34 git annex init 
35 git annex initremote d-in type=directory directory=../d-in exporttree=yes importtree=yes encryption=none
36
37 ls -l ../d-in
38
39 for r in 1 2; do 
40    echo \"Run $r\";  
41    dance
42 done 
43
44 echo \"more\" >> ../d-in/file
45 echo \"new\" > ../d-in/newfile
46 dance
47
48 rm ../d-in/file
49 dance
50
51 )
52
53 ```
54 </details>
55
56 and it seemed to do the right job!  I have not tried to add some `.gitattributes` into that branch it imports into to tell some files to go to git, but I hope it would just work, and if not -- I will come back!  feel welcome to close this issue.
57
58 Cheers
59 """]]