#!/bin/bash # ~/bin/example . <(ffoom init) ffoo import core # # basic echo helpers # think "about saying something..." # thinks loud if FFOO_VERBOSE warn "this is just an example" # obvious :) false || die "false was true!" # Perlism :) x=1; y=2; z=3 debug "x='$x'" "y='$y'" "z='$z'" # debug:example: x='1' # debug:example: y='2' # debug:example: z='3' debug -v x y z # << short for ^ echo "hello" | debug_pipe mypipe # debug|mypipe|: hello warn -f should_be_empty # warns with name+content # unless the file is empty myfun() { num=42 debug -v num } myfun # debug:myfun: num='42' # # more advanced functions # mkdir $HOME/.cfg cat >$HOME/.cfg/foo.ini < s1.py foo.ini # the -S will preserve spaces on RHS so python s1.py # << will work # # including runtime ini merging # mkdir $HOME/.cfg/private cat >$HOME/.cfg/private/foo.ini < future.log collect_artifacts # will preserve tree from / # and produce folder called e.g. # artifacts-20140915-141502 # # ...AND MORE! # ffoo import sw cat > deps.ini <