Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 51 lines (41 sloc) 1.004 kb
bb95f90 Jørgen P. Tjernø 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 Sergej Tatarincev 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;;
03adcda Dominik Pich appledoc now embeds the default templates, installing them on demand onl...
Daij-Djan authored
27 b)
7820c42 Sergej Tatarincev Added script for quick installation of the app and templates
SevInf authored
28 BINARY_DIR=$OPTARG;;
03adcda Dominik Pich appledoc now embeds the default templates, installing them on demand onl...
Daij-Djan authored
29 t)
30 INSTALL_TEMPLATES="YES"
31 echo "arg is = $OPTARG"
32 if [ $OPTARG != "default" ]; then
33 TEMPLATES_DIR=$OPTARG
34 fi
35 ;;
7820c42 Sergej Tatarincev Added script for quick installation of the app and templates
SevInf authored
36 [?])
37 usage
38 exit 1;;
39 esac
40 done
41
42 echo "Building..."
43 xcodebuild -target appledoc -configuration Release install
44
45 echo "Installing binary to $BINARY_DIR"
be3aa2c tomaz Fixed install script to better handle paths with whitespace, thanks to k...
authored
46 cp /tmp/appledoc.dst/usr/local/bin/appledoc "$BINARY_DIR"
7820c42 Sergej Tatarincev Added script for quick installation of the app and templates
SevInf authored
47
03adcda Dominik Pich appledoc now embeds the default templates, installing them on demand onl...
Daij-Djan authored
48 if [ "$INSTALL_TEMPLATES" == "YES" ]; then
49 echo "Copying templates to $TEMPLATES_DIR"
50 cp -R Templates/ "$TEMPLATES_DIR"
51 fi
Something went wrong with that request. Please try again.