Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created install script, works on OSX, Linux and SmartOS
- Loading branch information
Geoff Flarity
committed
Feb 7, 2012
1 parent
853b662
commit 76bd71b
Showing
1 changed file
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,9 +1,21 @@ | |||
install: | set -e | ||
/bin/mkdir -p /opt/nervous/bin | |||
/bin/mkdir -p /opt/nervous/log | |||
/bin/mkdir -p /opt/nervous/lib | |||
/bin/mkdir -p /opt/nervous/plugins/node_modules | |||
/usr/bin/install -m 0755 -t /opt/nervous/bin bin/nervous | |||
/usr/bin/install -m 0644 -t /opt/nervous/lib lib/* | |||
|
|
||
UNAME=`uname`; | |||
INSTALL='install' | |||
if [ $UNAME = 'Darwin' ]; then | |||
if which -s ginstall; then | |||
INSTALL='ginstall' | |||
else | |||
echo "Hi Mac user, please install coreutils via brew" | |||
fi | |||
fi | |||
|
|
||
DEFAULT_PREFIX=/opt | |||
PREFIX=${PREFIX:-$DEFAULT_PREFIX} | |||
|
|||
/bin/mkdir -p $PREFIX/nervous/bin | |||
/bin/mkdir -p $PREFIX/nervous/log | |||
/bin/mkdir -p $PREFIX/nervous/lib | |||
/bin/mkdir -p $PREFIX/nervous/plugins/node_modules | |||
$INSTALL -m 0755 -t $PREFIX/nervous/bin bin/nervous | |||
$INSTALL -m 0644 -t $PREFIX/nervous/lib lib/*js |