warbo-utilities: d4de114b7359d11674a3b91bfbe8322a7932f92d
1: #!/usr/bin/env bash
2:
3: # S3 will delete empty directories, but git checks for their presence. Create
4: # them if they don't exist.
5: if [[ -e HEAD ]] # Only make dirs in something that looks like a git repo!
6: then
7: for D in refs/heads refs/tags objects/info
8: do
9: [[ -e "$D" ]] || mkdir -p "$D"
10: done
11: fi
12:
13: command -v git > /dev/null || {
14: echo "No 'git' command, aborting $0" 1>&2
15: exit 1
16: }
17:
18: git update-server-info
19:
20: #command -v ts > /dev/null || {
21: # echo "No 'ts' command, aborting $0" 1>&2
22: # exit 1
23: #}
24:
25: # Fiddle environment to prevent problems
26: # shellcheck disable=SC2046
27: unset $(git rev-parse --local-env-vars)
28:
29: # Mirror everywhere (GitHub, etc.)
30: git remote | while read -r REMOTE
31: do
32: git branch | cut -c 3- | while read -r BRANCH
33: do
34: echo "Pushing '$BRANCH' to '$REMOTE'" 1>&2
35: git push "$REMOTE" "$BRANCH"
36: done
37: done
38:
39: #NAME=$(basename "$PWD" .git)
40: #if command -v laminarc > /dev/null &&
41: # [[ -e /var/lib/laminar/cfg/jobs/"$NAME".run ]]
42: #then
43: # echo "Queueing build of '$NAME'" 1>&2
44: # LAMINAR_REASON='Git hook' laminarc queue "$NAME"
45: #fi
46:
47: #echo "Scheduling push to Web and IPFS" 1>&2
48: #[[ -n "$IPFS_PATH" ]] || export IPFS_PATH=/var/lib/ipfs/.ipfs
49: if command -v ts > /dev/null
50: then
51: ts pushGitPages "$PWD"
52: else
53: if command -v tsp > /dev/null
54: then
55: tsp pushGitPages "$PWD"
56: else
57: echo "TaskSpooler (ts/tsp) not found, building pages directly" 1>&2
58: pushGitPages "$PWD"
59: fi
60: fi
Generated by git2html.