Added a comment
authorkolam <kolam@web>
Wed, 6 Dec 2023 21:08:05 +0000 (21:08 +0000)
committeradmin <admin@branchable.com>
Wed, 6 Dec 2023 21:08:05 +0000 (21:08 +0000)
doc/forum/client_repositories_setup_problem/comment_2_f9660534c3f3346f322de57c2da0eb27._comment [new file with mode: 0644]

diff --git a/doc/forum/client_repositories_setup_problem/comment_2_f9660534c3f3346f322de57c2da0eb27._comment b/doc/forum/client_repositories_setup_problem/comment_2_f9660534c3f3346f322de57c2da0eb27._comment
new file mode 100644 (file)
index 0000000..92ed584
--- /dev/null
@@ -0,0 +1,87 @@
+[[!comment format=mdwn
+ username="kolam"
+ avatar="http://cdn.libravatar.org/avatar/4d2741e5e0b47928bc599b00397b5e59"
+ subject="comment 2"
+ date="2023-12-06T21:08:05Z"
+ content="""
+Thanks Joey! Your comment is right on point.
+
+Changed to the following and now it works as expected. The bash script is now:
+
+```
+#/usr/bin/env bash
+
+# Just a way to access the script's directory
+cd \"$(dirname \"$0\")\"
+DIR=\"$(pwd)\"
+
+# Create the 1st client repository
+mkdir $DIR/client1
+cd $DIR/client1
+git init && git annex init
+
+# Create the 2nd client repository
+mkdir $DIR/client2
+cd $DIR/client2
+git init && git annex init
+
+# Create the transfer repository
+mkdir $DIR/share
+cd $DIR/share
+git init && git annex init
+
+# Setup the remotes and groups for the transfer repository
+cd $DIR/share
+git remote add client1 $DIR/client1
+git remote add client2 $DIR/client2
+git annex wanted . standard
+git annex group . transfer
+git annex group client1 client
+git annex group client2 client
+git annex mincopies 2
+git annex numcopies 2
+git co -b main
+
+# Setup the remotes and groups for the 1st client repository.
+cd $DIR/client1
+git remote add share $DIR/share
+git annex wanted . standard
+git annex group . client
+git annex group share transfer
+# git annex config --set annex.addunlocked true
+git co -b main
+
+# Setup the remotes and groups for the 2nd client repository.
+cd $DIR/client2
+git remote add share $DIR/share
+git annex wanted . standard
+git annex group . client
+git annex group share transfer
+# git annex config --set annex.addunlocked true
+git co -b main
+
+# Start git-annex assistant for client1 only
+cd $DIR/client1 && git annex assistant
+
+# Add a single file to the 1st client.
+cd $DIR/client1
+touch file.txt
+
+# Wait for the commit to be auto created by git-annex-assistant.
+sleep 3;
+
+cd $DIR/share
+git pull client1 main
+git annex assistant
+cd $DIR/client2
+git pull share main
+git annex assistant
+
+cd $DIR/client1
+echo \"My first line\" >> file.txt
+```
+
+I have other issues following that, but I'll create separate forum questions for them.
+
+Thanks again Joey.
+"""]]