Added a comment
This commit is contained in:
parent
adc95a871d
commit
f0c14b0e56
1 changed files with 87 additions and 0 deletions
|
@ -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.
|
||||
"""]]
|
Loading…
Reference in a new issue