diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:41:28 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:49:58 +0100 |
commit | 1e4a96730da70fcfa3b8c153874cbdebad0f9829 (patch) | |
tree | 9495f33f6b54621e0a684b553b64a6958744c1e3 /lib/common | |
parent | e1daac32c5b7ca0d902c16135d361aa5303f5124 (diff) | |
download | app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.gz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.bz2 app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.xz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.zip |
o Starting on a style guide.
app-conf: Adding 'import' command.
app-cat-conf: Adding support for multiple -f flags. The default files
can be switched off.
A file named "-" is the same as /dev/stdin.
app: Adding a way to enable debugging.
app-install-file: Import any configuration delivered with the package.
Diffstat (limited to 'lib/common')
-rw-r--r-- | lib/common | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -39,6 +39,14 @@ assert_is_app() { fi } +debug() { + [[ $echo_debug == no ]] || echo "D: $usage_app: $@" 2>&1 +} + +info() { + echo "I: $usage_app: $@" 2>&1 +} + fatal() { echo "$usage_app: fatal: $@" 2>&1 exit 1 @@ -192,4 +200,5 @@ run_app() { PATH=$PATH:$APPSH_HOME/bin:$APPSH_HOME/libexec # Save for later -usage_app=$0 +usage_app=${0##*/} +echo_debug=${echo_debug-no} |