Skip to content

Commit a9b9d80

Browse files
committed
added install-wrapper script and updated instructions
1 parent 6671696 commit a9b9d80

File tree

5 files changed

+55
-9
lines changed

5 files changed

+55
-9
lines changed

README.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Welcome To Gitdown
99

1010
Gitdown is a simple tool for writing documentation hosted on a github repository. It uses [ditaa][] to convert ascii diagrams into images, and produces [markdown][] documents that can be uploaded to your repository along with code. I made Gitdown so that we could write technical white papers and user guides as plain text (including diagrams) and publish them with a single "git push" command. Gitdown is a simpler version of the tool we use to maintain the [ØMQ][zeromq] [Guide][zguide].
1111

12-
Gitdown is written and maintained by Pieter Hintjens. Please use the issue [tracker][] for all comments and errata. This document was published on Tuesday February, 2013 at 16:43:34, and generated by the magic of Gitdown from README.txt.
12+
Gitdown is written and maintained by Pieter Hintjens. Please use the issue [tracker][] for all comments and errata. This document was published on Tuesday February, 2013 at 19:42:21, and generated by the magic of Gitdown from README.txt.
1313

1414
This is version 2011.03.24 of Gitdown. Changelog:
1515

@@ -24,9 +24,9 @@ Contents
2424

2525
&emsp;<a href="#toc2-38">License</a>
2626
&emsp;<a href="#toc2-47">Installation and Use</a>
27-
&emsp;<a href="#toc2-72">How it Works</a>
28-
&emsp;<a href="#toc2-127">Gitdown Syntax Summary</a>
29-
&emsp;<a href="#toc2-193">Markdown Syntax Summary</a>
27+
&emsp;<a href="#toc2-79">How it Works</a>
28+
&emsp;<a href="#toc2-134">Gitdown Syntax Summary</a>
29+
&emsp;<a href="#toc2-200">Markdown Syntax Summary</a>
3030

3131
<A name="toc2-38" title="License" />
3232
License
@@ -46,7 +46,14 @@ The code is in the bin subdirectory. Here is how I install it on a new box:
4646
sudo cp bin/* /usr/local/bin
4747
export PERLLIB=$PATH # goes into .bash_profile
4848

49-
Gitdown includes Ditaa/0.9 and assumes that Ditaa goes into /usr/local/bin/ditaa0_9.jar. Feel free to propose a better design.
49+
Gitdown includes Ditaa/0.9 and assumes that Ditaa goes into /usr/local/bin/ditaa0_9.jar.
50+
51+
Another option is to leave the files in the git directory and install a wrapper script.
52+
Assuming the directory ~/bin exists and is in your path, you can do the following:
53+
54+
make-wrapper ~/bin
55+
56+
to create the file ~/bin/gitdown, which will set things up to run correctly.
5057

5158
Gitdown assumes that these tools are already installed on your box, which is easy if you're running Linux:
5259

@@ -62,7 +69,7 @@ To use Gitdown, edit a text document much like this README.txt. Then:
6269

6370
The images directory holds images for all documents in the current directory. You can write documents anywhere on the git tree but if they are not at the root you must tell Gitdown how to create a full image path by setting the SUBDIR symbol (see below).
6471

65-
<A name="toc2-72" title="How it Works" />
72+
<A name="toc2-79" title="How it Works" />
6673
How it Works
6774
------------
6875

@@ -81,7 +88,7 @@ The Gitdown workflow is:
8188

8289
This README acts as an example.
8390

84-
<A name="toc2-127" title="Gitdown Syntax Summary" />
91+
<A name="toc2-134" title="Gitdown Syntax Summary" />
8592
Gitdown Syntax Summary
8693
---------------------
8794

@@ -147,7 +154,7 @@ These symbols are predefined by gitdown for you:
147154
* SELF specifies the input file name without extension.
148155
* OUTPUT specifies the current output file name,
149156

150-
<A name="toc2-193" title="Markdown Syntax Summary" />
157+
<A name="toc2-200" title="Markdown Syntax Summary" />
151158
Markdown Syntax Summary
152159
-----------------------
153160

README.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ The code is in the bin subdirectory. Here is how I install it on a new box:
4949
sudo cp bin/* /usr/local/bin
5050
export PERLLIB=$PATH # goes into .bash_profile
5151

52-
Gitdown includes Ditaa/0.9 and assumes that Ditaa goes into /usr/local/bin/ditaa0_9.jar. Feel free to propose a better design.
52+
Gitdown includes Ditaa/0.9 and assumes that Ditaa goes into /usr/local/bin/ditaa0_9.jar.
53+
54+
Another option is to leave the files in the git directory and install a wrapper script.
55+
Assuming the directory ~/bin exists and is in your path, you can do the following:
56+
57+
install-wrapper ~/bin
58+
59+
to install the file ~/bin/gitdown, which will set things up to run correctly.
5360

5461
Gitdown assumes that these tools are already installed on your box, which is easy if you're running Linux:
5562

images/README_1.png

0 Bytes
Loading

images/README_2.png

0 Bytes
Loading

install-wrapper

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
destdir=$1
4+
5+
if [ -z "$destdir" ] ; then
6+
destdir=$HOME/bin
7+
if [ -d "$destdir" ]; then
8+
echo "installing in default directory: $destdir"
9+
else
10+
exit
11+
fi
12+
else
13+
if ! [ -d "$destdir" ] ; then
14+
echo "path [$destdir] is not a directory"
15+
exit
16+
fi
17+
fi
18+
19+
srcdir=$(readlink -f $(dirname $0))
20+
21+
target=$destdir/gitdown
22+
23+
if [ -e "$target" ] ; then
24+
echo "file $target already exists!"
25+
exit
26+
fi
27+
28+
cat <<EOS > $target
29+
#!/bin/sh
30+
exec env PERLLIB=$srcdir $srcdir/bin/gitdown \$@
31+
EOS
32+
chmod +x $target

0 commit comments

Comments
 (0)