openhab-addons/bundles/create_openhab_binding_skeleton.sh
Kai Kreuzer bbf1a7fd29 Codebase as of c53e4aed26 as an initial commit for the shrunk repo
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-20 23:57:58 +02:00

32 lines
832 B
Bash
Executable File

#!/bin/bash
[ $# -lt 3 ] && { echo "Usage: $0 <BindingIdInCamelCase> <Author> <GitHub Username>"; exit 1; }
openHABVersion=3.0.0-SNAPSHOT
camelcaseId=$1
id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
author=$2
githubUser=$3
mvn -s archetype-settings.xml archetype:generate -N \
-DarchetypeGroupId=org.openhab.core.tools.archetypes \
-DarchetypeArtifactId=org.openhab.core.tools.archetypes.binding \
-DarchetypeVersion=$openHABVersion \
-DgroupId=org.openhab.binding \
-DartifactId=org.openhab.binding.$id \
-Dpackage=org.openhab.binding.$id \
-Dversion=$openHABVersion \
-DbindingId=$id \
-DbindingIdCamelCase=$camelcaseId \
-DvendorName=openHAB \
-Dnamespace=org.openhab \
-Dauthor="$author" \
-DgithubUser="$githubUser"
directory="org.openhab.binding.$id/"
cp ../src/etc/NOTICE "$directory"