#!/bin/sh log=/tmp/log CMD="$1" echo "CMD: $CMD" >> "$log" while read -r INPUT ; do echo "INPUT: $INPUT" >> "$log" done case "$CMD" in supports-api-version) echo 1 ;; get-package-data) echo "PackageType=repo" echo "Name=test-pkg" ;; esac echo >> "$log"