mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Changing how functions are called
Old way:
functionName CONTENT argument1 argument2
New way:
echo -n "$CONTENT" | functionName argument1 argument2
This follow the Unix style more closely.
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
date-string() { date; }
|
||||
wrapper() { echo -n "*** $1 ***"; }
|
||||
date-string() {
|
||||
date
|
||||
}
|
||||
wrapper() {
|
||||
echo -n "*** $(cat) ***"
|
||||
}
|
||||
|
||||
export IP=127.0.0.1
|
||||
export ALLOWED_HOSTS=( 192.168.0.1 192.168.0.2 192.168.0.3 )
|
||||
|
||||
. mo # Keep in mind this script is executing in the parent directory
|
||||
. ./mo # Keep in mind this script is executing in the parent directory
|
||||
cat <<EOF | mo
|
||||
# {{#wrapper}}OH SO IMPORTANT{{/wrapper}}
|
||||
# This file automatically generated at {{date-string}}
|
||||
|
||||
Reference in New Issue
Block a user