#!/bin/sh if [ "$1" == "" ]; then echo "usage: $0 application-name create application skeleton in current folder" exit fi mkdir -p $1 mkdir -p $1/ebin mkdir -p $1/tests mkdir -p $1/scripts # # mkdir -p $1/support # mkdir -p $1/src cat < $1/src/$1.app {application, $1, [ {description, ""}, %% description here {vsn, "0.0"}, %% version {id, "$1"}, %% identifier %% {modules, []}, {applications, [kernel, stdlib]}, %% dependences %% {mod, {$1, START_ARGS}}, %% Specify the module name to start the application, plus args {env, []} %% environement ] }. EOF cat < $1/src/Makefile include ../support/include.mk all: $(EBIN_FILES) debug: $(MAKE) DEBUG=-DDEBUG clean: rm -rf $(EBIN_FILES) EOF cat < $1/Makefile all: (cd src;$(MAKE)) clean: (cd src;$(MAKE) clean) (cd tests;$(MAKE) clean) test: all (cd tests;$(MAKE) test) clean_logs: (cd tests;$(MAKE) clean_logs) compile: erl -make cp src/$1.app ebin/$1.app clean: rm -rf ./ebin/*.* EOF echo "Project skeleton created. change project settings in $1/src/$1.app "