blob: 3455541c97113ec75dcd98099c9d703778f0bf09 (
plain)
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
|
#!/bin/bash
# This script creates a new releas of chklref
CWD="$(pwd)/$0"
CHKLREFGIT=$(dirname $"CWD")
DATE=$(date +%Y%m%d)
# Local temporary directory
LOCAL_TMPDIR="$HOME/tmp/chklref-$DATE"
CHKLREF_DIR="$LOCAL_TMPDIR/chklref"
# Perform git archive
git_archive() {
cwd=$(pwd)
[[ -d "$LOCAL_TMPDIR" ]] && rm -rf "$LOCAL_TMPDIR"
mkdir -p "$CHKLREF_DIR"
cd "$CHKLREFGIT"
git archive --format=tar master | tar -x -C "$CHKLREF_DIR"
cd "$cwd"
}
compile_doc() {
cwd=$(pwd)
cd "$CHKLREF_DIR/doc"
make
cd "$cwd"
}
create_tds() {
cwd=$(pwd)
mkdir -p "$CHKLREF_DIR/chklref.tds"
cd "$CHKLREF_DIR/chklref.tds"
mkdir -p tex/latex/chklref
mkdir -p doc/latex/chklref
mkdir -p scripts/chklref
cp ../chklref.sty tex/latex/chklref
cp ../doc/chklref.{tex,pdf} doc/latex/chklref
cp ../README.md doc/latex/chklref
cp ../chklref.pl scripts/chklref
cd ..
zip -r chklref.tds.zip chklref.tds
rm -rf chklref.tds
cd "$cwd"
}
git_archive
compile_doc
create_tds
zip -r "$CHKLREF_DIR.zip" "$CHKLREF_DIR"
|