Skip to content

Commit

Permalink
Added script for quick installation of the app and templates
Browse files Browse the repository at this point in the history
Added install-appledoc.sh script that can be used to quickly install
appledoc. It can be invoked from terminal with "sudo sh
install-appledoc.sh" command. By default, it installs binary to
/usr/local/bin and templates to ~/.appledoc. This directories can be
overridden with -b and -t options respectively.
  • Loading branch information
Sergej Tatarincev committed Sep 3, 2011
1 parent ef54d87 commit 7820c42
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions install-appledoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

BINARY_DIR=/usr/local/bin/
TEMPLATES_DIR=~/.appledoc

usage() {
cat <<EOF
Usage: $0 [-b binary_path] [-t templates_path]
Builds and installs appledoc
OPTIONS:
-b Path where binary will be installed. Default is $BINARY_DIR
-t Path where templates will be installed. Default is $TEMPLATES_DIR
EOF
}

while getopts "hb:t:" OPTION
do
case $OPTION in
h) usage
exit 0;;
b)
BINARY_DIR=$OPTARG;;
t)
TEMPLATES_DIR=$OPTARG;;
[?])
usage
exit 1;;
esac
done

echo "Building..."
xcodebuild -target appledoc -configuration Release install

echo "Installing binary to $BINARY_DIR"
cp /tmp/appledoc.dst/usr/local/bin/appledoc $BINARY_DIR

echo "Copying temapltes to $TEMPLATES_DIR"
cp -R Templates $TEMPLATES_DIR

0 comments on commit 7820c42

Please sign in to comment.