make clean
pushd i18n
./tbe_levels_i18n.sh
popd
make
make package
build
directory:.deb
<- for Debian and Ubuntu systems.rpm
<- for Fedora, Red Hat, CentOS, Opensuse and Suse systems.sh
<- for local installation (e.g. in your home directory) self-extracting archive.tar.gz
<- tarball for local installation (e.g. in your home directory)#!/bin/sh |
# |
# ChicagoBoss: Erlang for everybody. |
# |
# |
# Shouts: Evan of course, and many other contributors for keeping CB awesome. |
# |
# |
# Copyright 2012 Barry Allard <[email protected]>. All rights reserved. MIT licensed. |
# |
# Disclaimer: This is an unofficial contrib. |
set -e |
# ---- config |
CHICAGO_VSN=0.8.0 |
MY_NAME_IS='$(basename $0)' |
HERE='$(dirname $0)' |
# ---- functions |
err() { |
echo'$1'>&1 |
} |
die() { |
err |
err '$1' |
err |
exit${2:-1} |
} |
is_head_arg() { |
[ x'$1' x'--head' ] || [ x'$1' x'head' ] |
} |
is_atom() { |
echo'$1'| egrep -q -- '^([a-z][a-zA-Z0-9_@]*|'''[^'''][^''']*''')$' |
} |
help() { |
die 'Usage: $MY_NAME_IS [--head] new_project_name |
--head Use ChicagoBoss github master in-development sources instead of the release tarball. |
' |
} |
# ---- start |
cd'$HERE' |
if is_head_arg '$1';then |
shift |
HEAD=1 |
fi |
if is_head_arg '$1';then |
[ -n'$HEAD' ] && die '$MY_NAME_IS: Cannot specify head option again' |
HEAD=1 |
fi |
PROJECT='$1' |
if [ -z'$PROJECT' ];then |
help'Missing project name argument' |
elif! is_atom '$PROJECT';then |
die '$MY_NAME_IS: Project name '$PROJECT' must be an atom. |
For reference, a valid project atom would be: |
[a-z][a-zA-Z0-9_@]* |
Dont use the quoted form unless you enjoy pain. |
' |
fi |
if [ -d'$HERE/$PROJECT' ];then |
die '$MY_NAME_IS: $HERE/$PROJECT already exists!' |
fi |
if [ -n'$HEAD' ];then |
CHICAGO_VSN='HEAD' |
DIR='ChicagoBoss-HEAD' |
if [ !-d'$DIR' ];then |
echo Installing ChicagoBoss $CHICAGO_VSN |
git clone https://github.com/evanmiller/ChicagoBoss.git '$DIR' |
cd'$DIR' |
else |
echo Updating ChicagoBoss $CHICAGO_VSN |
cd'$DIR' |
git pull |
fi |
else |
echo Installing ChicagoBoss $CHICAGO_VSN |
DIR='ChicagoBoss-$CHICAGO_VSN' |
[ !-d'$DIR' ] && curl -L http://www.chicagoboss.org/ChicagoBoss-$CHICAGO_VSN.tar.gz | tar zxf - |
cd'$DIR' |
fi |
make |
make app PROJECT='$PROJECT' |
cd'$PROJECT' |
cat > .gitignore <<GIT_IGNORE |
*.beam |
*.app |
ebin/ |
log/ |
GIT_IGNORE |
if which git >/dev/null 2>&1;then |
git init |
git add -A |
git commit 'ChicagoBoss $CHICAGO_VSN bootstrapped a new project: $PROJECT.' |
fi |
cat << 'FIST' |
,_, _-, _ |
,--, / |/' |`/ | |
/ |` ` ` | |
| | | ' | | |
| |3 | O | $ | $ | |
| | | | |__ |
__/: : | | ) |
`---',___/,-----` / |
`--._| / |
`------` |
FIST |
cat <<POST |
Chicago $CHICAGO_VSN created a new template project $PROJECT. |
Now you can hack on it: cd '$HERE/$PROJECT' |
Don't worry about messing things up, CB lives elsewhere. |
And do check out http://www.chicagoboss.org for guides, examples and doc. |
POST |
InstallUsage |