#!/bin/bash

if [ "$(which alba_blissrc 2>/dev/null)" ] ; then
  echo "loading .rc file ..."
  . alba_blissrc
fi

# if a -v (verbose) option is not set, stdout will be redirected
TRACE="/dev/null"
if [ $(echo $* | grep "[-]v[0-9]") ] ; then
 TRACE="" 
fi

FOLDER=$(python -c "import imp;print(imp.find_module('PyTangoArchiving')[1])")
#cd $FOLDER/widget
CMD=$FOLDER/widget/ArchivingBrowser.py

if [ "$(which t3)" ]; then
 CMD="t3 $CMD"
fi
if [ "$TRACE" ] ; then
 python "$CMD" $* &>$TRACE
else
 python "$CMD" $* &
fi

