Skip to content

Commit

Permalink
Use bash & errexit to exit if something fails.
Browse files Browse the repository at this point in the history
This fixes GH-174.
  • Loading branch information
jorgenpt committed Jan 19, 2012
1 parent b8367f1 commit bb95f90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions install-appledoc.sh 100644 → 100755
@@ -1,4 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash

# Enable errexit: Exit if any "simple command" fails
set -e

BINARY_DIR=/usr/local/bin/
TEMPLATES_DIR=~/.appledoc
Expand Down Expand Up @@ -38,4 +41,4 @@ echo "Installing binary to $BINARY_DIR"
cp /tmp/appledoc.dst/usr/local/bin/appledoc "$BINARY_DIR"

echo "Copying templates to $TEMPLATES_DIR"
cp -R Templates/ "$TEMPLATES_DIR"
cp -R Templates/ "$TEMPLATES_DIR"

0 comments on commit bb95f90

Please sign in to comment.