mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
contributions: Updated assignments in template
Fixed bug in sensortemplate script. Handled assinment operator with export since exec'ed processes need these variables. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
78eb975435
commit
d9fd1af272
@ -108,13 +108,14 @@ commands below to generate collateral files for your new sensor library.
|
||||
#!/bin/bash
|
||||
|
||||
function make_new_sensor {
|
||||
SensorName=$1
|
||||
export SensorName=$1
|
||||
# Get a lowercase version of the string
|
||||
export sensorname=${SensorName,,}
|
||||
|
||||
# Make sure this is run from the root UPM directory
|
||||
if ! grep -q 'UPM ' README.md; then echo "Please run from the root UPM directory"; return -1; fi
|
||||
|
||||
# Copy/paste the below commands into a bash shell...
|
||||
# Get a lowercase version of the string
|
||||
sensorname=${SensorName,,}
|
||||
printf "Generating new sensor: ${SensorName}\n"
|
||||
# Copy sensortemplate files to ${sensorname}
|
||||
find docs/ examples/ src/ -name '*sensortemplate*' -exec bash -c 'cp -r $0 ${0/sensortemplate/${sensorname}}' {} \;
|
||||
# Copy SensorTemplate files to ${SensorName}
|
||||
|
Loading…
x
Reference in New Issue
Block a user