ocarina/scripts/functions

26 lines
297 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
}