3 # This script can be used by a cron to generate snapshots.
5 # 35 0 * * * mkdist elinks-0.11 0.11 >>mkdist.log 2>&1
6 # 40 0 * * * mkdist HEAD 0.12 >>mkdist.log 2>&1
8 # To generate a release (which doesn't have a date in the
9 # top-level directory) also pass -r as the third parameter.
13 echo "-------------------------------------------------"
16 echo "-------------------------------------------------"
21 GIT_DIR
="elinks-repo-directory"
22 DOC_DIR
="" # Leave empty for no doc dir
23 TMP_DIR
="/tmp/elinks-git.$$"
24 TAR_DIR
="elinks-snapshot-directory"
29 if [ "$3" != "-r" ]; then
30 ver
=$lb-`date +%Y%m%d`
40 GIT_DIR="$GIT_DIR" cg-export -r "$ub" "$TMP_DIR"/elinks"
47 if [ "$ub" = "REL_0_10" ]; then
49 tar xfz elinks-
$lb*.
tar.gz
55 if test -n "$DOC_DIR"; then
57 cp -r "$DOC_DIR"/*.html
* doc
/html
59 # cp "$DOC_DIR"/*.pdf doc/pdf
70 tar cfz elinks
$c-$lb.
tar.gz elinks-
$ver && \
71 mv elinks
$c-$lb.
tar.gz
"$TAR_DIR" && \
72 (cd "$TAR_DIR" && md5sum elinks
$c-$lb.
tar.gz
> elinks
$c-$lb.
tar.gz.md5
)
74 tar cfj elinks
$c-$lb.
tar.bz2 elinks-
$ver && \
75 mv elinks
$c-$lb.
tar.bz2
"$TAR_DIR" && \
76 (cd "$TAR_DIR" && md5sum elinks
$c-$lb.
tar.bz2
> elinks
$c-$lb.
tar.gz.md5
)