34 lines
416 B
Bash
34 lines
416 B
Bash
#!/bin/bash
|
|
|
|
DEBUG=%DEBUG
|
|
|
|
function get_app_dir
|
|
{
|
|
dir="$HOME/.%APP"
|
|
if [ "$DEBUG" == "True" ]; then
|
|
dir="$dir-debug"
|
|
fi
|
|
echo $dir
|
|
}
|
|
|
|
function write_to_pipe
|
|
{
|
|
pipe=`get_app_dir`/pipe
|
|
if [ ! -p $pipe ]; then
|
|
exit 0
|
|
fi
|
|
|
|
file=`mktemp`
|
|
echo "$*" > $file
|
|
echo $file > $pipe
|
|
rm -f $file
|
|
}
|
|
|
|
#cmd=`which %%OCARINA%%-$1 2>/dev/null`
|
|
#args="${@: +2}"
|
|
#if [ "$cmd" ]; then
|
|
# $cmd "$args"
|
|
#else
|
|
# %%BIN%% "$*"
|
|
#fi
|