Skip to content

Commit

Permalink
Adds support for updating an openmrnidf repo instead of an android repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Jan 29, 2024
1 parent b53552b commit 40d93f0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions arduino/libify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

function usage() {
echo
echo 'usage: libify.sh path/to/arduino/library/output path/to/openmrn [-f] [-l]'
echo 'usage: libify.sh path/to/arduino/library/output path/to/openmrn [-f] [-l] [-i]'
echo 'exports OpenMRN code as an arduino library.'
echo 'example: libify.sh ~/Arduino/libraries/OpenMRN .. -l'
echo '(options must come after the path specification)'
echo '-f will erase the target library before exporting.'
echo '-l will create symlinks instead of copying files.'
echo '-i will create OpenMRNIDF repository instead of arduino.'
exit 1
}

Expand Down Expand Up @@ -61,6 +62,7 @@ fi

USE_LINK=
VERBOSE=
TARGET_IDF=

while [ "x$1" != "x" ] ; do
case $1 in
Expand All @@ -71,6 +73,9 @@ while [ "x$1" != "x" ] ; do
-l)
USE_LINK=-s
;;
-i)
TARGET_IDF=1
;;
-v)
VERBOSE=1
;;
Expand Down Expand Up @@ -130,8 +135,10 @@ function copy_dir() {
popd >/dev/null
}

copy_file . arduino/{library.json,library.properties,keywords.txt,README.md,LICENSE,CONTRIBUTING.md}
copy_dir . arduino/examples
if [ "x$TARGET_IDF" == "x" ]; then
copy_file . arduino/{library.json,library.properties,keywords.txt,README.md,LICENSE,CONTRIBUTING.md}
copy_dir . arduino/examples
fi

copy_file src arduino/OpenMRNLite.{h,cpp} arduino/CDIXMLGenerator.hxx \
include/{can_frame.h,nmranet_config.h,openmrn_features.h} \
Expand Down

0 comments on commit 40d93f0

Please sign in to comment.