forked from jeffreykegler/Marpa-web-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp_working.sh
42 lines (36 loc) · 1.02 KB
/
cp_working.sh
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
#!sh
set -x
# NOTE: This is NOT portable
# It relies on my directory layout
libmarpa_dir=$HOME/projects/libmarpa
if test -d $libmarpa_dir
then :
else
echo $libmarpa_dir not found 1>&2
exit 1
fi
# These are the "configurable" settings
branch=master
target_d=libmarpa_api/latest
source_d=stage/$branch.d
work_d=$source_d/work
dev_d="$work_d"/dev
doc_d="$work_d"/doc
doc1_d="$work_d"/doc1
test -d stage || mkdir stage
rm -rf $source_d
git clone -b "$branch" file://$libmarpa_dir "$source_d"
test -d "$dev_d" || exit 1
(cd "$dev_d" && make ../doc/api.html/index.html)
test -d libmarpa_api || exit 1
(cd $source_d && make doc_dist doc1_dist)
rm -rf "$target_d"
mkdir "$target_d"
test -d "$doc_d" || exit 1
(cd $doc_d && ./configure && make html)
test -d "$doc1_d" || exit 1
(cd $doc1_d && ./configure && make html)
(cd "$target_d" && rm *.html)
(cd "$target_d" && perl ../../api_doc_here.pl "../../$doc_d/api.html")
cp "$doc1_d/api.html" temp/api_one_page.html
(cd "$target_d" && perl ../../api_doc_here.pl ../../temp/api_one_page.html)