-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild-site
executable file
·41 lines (32 loc) · 1.09 KB
/
build-site
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
#!/bin/bash
set -exuo pipefail
function git_clone() {
local repo_name="$1"
mkdir -p source-repos
rm -rf "source-repos/$repo_name"
git clone --depth 1 https://github.com/grml/"$repo_name" source-repos/"$repo_name"
}
function copy_set_url() {
local source_file="$1"
local dest_file="$2"
local url="$3"
cat > "$dest_file" <<EOT
+++
url = '$url'
+++
EOT
cat "$source_file" >> "$dest_file"
}
git_clone grml2usb
cp source-repos/grml2usb/grml2usb.8.txt content/grml2usb/_index.adoc
copy_set_url source-repos/grml2usb/grml2iso.8.txt content/grml2usb/grml2iso.adoc grml2usb/grml2iso.html
git_clone grml-debootstrap
cp source-repos/grml-debootstrap/grml-debootstrap.8.txt content/grml-debootstrap/index.adoc
git_clone grml-etc-core
cp source-repos/grml-etc-core/doc/grmlzshrc.adoc content/zsh/grmlzshrc.adoc
copy_set_url source-repos/grml-etc-core/doc/grmlzshrc.adoc content/zsh/grmlzshrc.adoc zsh/grmlzshrc.html
git_clone grml-live
cp source-repos/grml-live/docs/grml-live.txt content/grml-live/index.adoc
git_clone grml-x
cp source-repos/grml-x/grml-x.txt content/grml-x/index.adoc
hugo --minify