~mcornick/www

ref: 5689df0ca10faf8aae84e75f65e1bff0be93f6b0 www/deploy.sh -rwxr-xr-x 3.0 KiB
5689df0c — Mark Cornick Add episode list to Spanish and French index pages 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash -e
export TZ=UTC

deploy_www() {
  printf "%s... " "$1"
  rm -rf public
  cd content/show
  for en in episode*.en.md; do
    for lang in es fr; do
      target=${en//en/$lang}
      ln -sf "$en" "$target"
    done
  done
  cd ../..
  hugo --config "config-$3.toml" --quiet --minify --baseURL "$1"
  case "$4" in
    rsync)
      rsync --exclude "gemini" -a public/ "$2" >/dev/null 2>&1
      ;;
    rclone)
      rm -rf public/gemini public/**/gemini
      rclone copy public/ "$2"
      ;;
    *)
      true
      ;;
  esac
  printf "done\n"
}

deploy_gemini() {
  printf "%s... " "$1"
  rm -rf public
  hugo --quiet --minify --baseURL "$1"
  mv public/blog/gemini/index.gmi public/gemini/blog/index.gmi
  mv public/show/gemini/index.gmi public/gemini/show/index.gmi
  cp static/pgpkey.txt public/gemini
  case "$4" in
    rsync)
      rsync -a public/gemini/ "$2" >/dev/null 2>&1
      ;;
    *)
      true
      ;;
  esac
  printf "done\n"
}

deploy_www https://markcornick.com/ fastmail: en rclone
deploy_www https://aussies.space/~mcornick/ mcornick@aussies.space:/home/mcornick/public_html en rsync
deploy_www https://bsd.tilde.team/~mcornick/ mcornick@bsd.tilde.team:/home/mcornick/public_html en rsync
deploy_www https://ctrl-c.club/~mcornick/ mcornick@ctrl-c.club:/home/mcornick/public_html en rsync
deploy_www https://envs.net/~mcornick/ mcornick@envs.net:/home/mcornick/public_html en rsync
deploy_www https://mcornick.tilde.institute/ mcornick@tilde.institute:/home/mcornick/public_html en rsync
deploy_www https://texto-plano.xyz/~mcornick/ mcornick@texto-plano.xyz:/home/mcornick/public_html es rsync
deploy_www https://thunix.net/~mcornick/ mcornick@thunix.net:/home/mcornick/public_html en rsync
deploy_www https://tilde.club/~mcornick/ mcornick@tilde.club:/home/mcornick/public_html en rsync
deploy_www https://tilde.team/~mcornick/ mcornick@tilde.team:/home/mcornick/public_html en rsync
deploy_www https://yourtilde.com/~mcornick/ mcornick@yourtilde.com:/home/mcornick/public_html en rsync
deploy_www https://mcornick.sdf.org/ mcornick@ma.sdf.org:/meta/m/mcornick/html en rsync
ssh mcornick@ma.sdf.org mkhomepg -p >/dev/null 2>&1
deploy_www https://mcornick.sdf.org/ mcornick@sdf.org:/sdf/arpa/gm/m/mcornick/html en rsync
deploy_www https://mcornick.com/ mcornick@sdf.org:/sdf/arpa/gm/m/mcornick/html/mcornick.com en rsync
ssh mcornick@sdf.org mkhomepg -p >/dev/null 2>&1

deploy_gemini gemini://gemini.ctrl-c.club/~mcornick/ mcornick@ctrl-c.club:/home/mcornick/public_gemini en rsync
deploy_gemini gemini://envs.net/~mcornick/ mcornick@envs.net:/home/mcornick/public_gemini en rsync
deploy_gemini gemini://tilde.pink/~mcornick/ mcornick@tilde.pink:/home/mcornick/public_gemini en rsync
deploy_gemini gemini://tilde.team/~mcornick/ mcornick@tilde.team:/home/mcornick/public_gemini en rsync
deploy_gemini gemini://gem.sdf.org/mcornick/ mcornick@ma.sdf.org:/meta/m/mcornick/gemini en rsync
deploy_gemini gemini://sdf.org/mcornick/ mcornick@sdf.org:/sdf/arpa/gm/m/mcornick/gopher en rsync
ssh mcornick@sdf.org mkgopher -p >/dev/null 2>&1