Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 45 lines (34 sloc) 0.833 kB
bb95f90 @jorgenpt Use bash & errexit to exit if something fails.
jorgenpt authored
1 #!/usr/bin/env bash
2
3 # Enable errexit: Exit if any "simple command" fails
4 set -e
7820c42 @SevInf Added script for quick installation of the app and templates
SevInf authored
5
6 BINARY_DIR=/usr/local/bin/
7 TEMPLATES_DIR=~/.appledoc
8
9 usage() {
10 cat <<EOF
11 Usage: $0 [-b binary_path] [-t templates_path]
12
13 Builds and installs appledoc
14
15 OPTIONS:
16 -b Path where binary will be installed. Default is $BINARY_DIR
17 -t Path where templates will be installed. Default is $TEMPLATES_DIR
18
19 EOF
20 }
21
22 while getopts "hb:t:" OPTION
23 do
24 case $OPTION in
25 h) usage
26 exit 0;;
27 b)
28 BINARY_DIR=$OPTARG;;
29 t)
30 TEMPLATES_DIR=$OPTARG;;
31 [?])
32 usage
33 exit 1;;
34 esac
35 done
36
37 echo "Building..."
38 xcodebuild -target appledoc -configuration Release install
39
40 echo "Installing binary to $BINARY_DIR"
be3aa2c @tomaz Fixed install script to better handle paths with whitespace, thanks t…
authored
41 cp /tmp/appledoc.dst/usr/local/bin/appledoc "$BINARY_DIR"
7820c42 @SevInf Added script for quick installation of the app and templates
SevInf authored
42
46027a8 @tomaz Fixed typo in install script.
authored
43 echo "Copying templates to $TEMPLATES_DIR"
bb95f90 @jorgenpt Use bash & errexit to exit if something fails.
jorgenpt authored
44 cp -R Templates/ "$TEMPLATES_DIR"
Something went wrong with that request. Please try again.