diff options
author | vg <vg@devys.org> | 2018-02-17 13:54:58 +0100 |
---|---|---|
committer | vg <vg@devys.org> | 2018-02-17 13:54:58 +0100 |
commit | 6ab1617a03ec392d2209f7ab4f8f8d8eeb3f6cc5 (patch) | |
tree | 6ae0159511b25c36b127f62bac51785a77be75bc | |
parent | d99e7de5de3a74cad3e12cd2dbce8d5d6bf9ee97 (diff) | |
download | scripts-6ab1617a03ec392d2209f7ab4f8f8d8eeb3f6cc5.tar.gz scripts-6ab1617a03ec392d2209f7ab4f8f8d8eeb3f6cc5.tar.bz2 scripts-6ab1617a03ec392d2209f7ab4f8f8d8eeb3f6cc5.zip |
let the hostident be easily modifiable
-rwxr-xr-x | scripts/git-sync | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/git-sync b/scripts/git-sync index 17db0f6..cddacdd 100755 --- a/scripts/git-sync +++ b/scripts/git-sync @@ -4,6 +4,8 @@ set -eu verbose=0 hosthash=$(python3 -c "import uuid, hashlib print(hashlib.new('sha1', str(uuid.getnode()).encode('utf8')).hexdigest())") +#hostident="${HOSTNAME}" +hostident="${hosthash}" if [ -d "$(git rev-parse --git-dir)/annex" ]; then echo 'Sync: using git annex' @@ -17,7 +19,7 @@ branch_name=$(git symbolic-ref -q --short HEAD) remote_name=$(git config --get branch.${branch_name}.remote || true) # conflict commit message -conflict_message="Merge conflict autocommit on ${hosthash}" +conflict_message="Merge conflict autocommit on ${hostident}" if [ -z "$remote_name" ]; then echo "No remote for this repository" >&2 @@ -37,7 +39,7 @@ fi git add -A "./$(git rev-parse --show-cdup)" if git status --porcelain | grep -q .; then git status --short - git commit -m "Auto-commit on ${hosthash}" + git commit -m "Auto-commit on ${hostident}" fi if [ "$verbose" -ne 0 ]; then @@ -56,7 +58,7 @@ fi git status --porcelain | while read -r filename; do state="${filename:0:2}" filename="${filename:3}" - ours="${filename}.${hosthash}.conflict" + ours="${filename}.${hostident}.conflict" theirs="${filename}.${remote_name}.conflict" case "$state" in *U*) |