#!/bin/sh
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
#     license: GNU General Public License, version 3

LOG_DIR=$HOME/mylib
mkdir -p $LOG_DIR

. /usr/share/doc/shellia/examples/mylib

eval "$ia_init"

with_ssh=""
while [ $# -gt 0 ]; do
  case "$1" in
    --with-ssh)
      with_ssh="$1"
      shift
      ;;
    *)
      err "Unknown option <$1>"
      ;;
  esac
done

ia_add "info \"example.mylib start\""

if [ "$with_ssh" ]; then
  my_ssh localhost "/usr/share/doc/shellia/examples/hello_world_error <-i> -- \"debian linux\""
else
  my_file "/usr/share/doc/shellia/examples/hello_world_error <-i> -- \"debian linux\""
fi

ia_add "info \"example.mylib end\""
ia -c
