goonvif/gen.sh

21 lines
339 B
Bash
Executable File

#!/bin/bash
SCRIPT_DIR=`cd "$(dirname "")" && pwd`
SDK_DIR=$SCRIPT_DIR/sdk
Package=$1
Type=$2
if [ "$Package" = "" ]; then
echo "Usage: <package> <type>"
fi
if [ "$Type" = "" ]; then
echo "Usage: <package> <type>"
fi
cd $SDK_DIR/$Package
echo "Generating $Package $Type"
go run $SDK_DIR/codegen/main.go $Package $Package $Type