Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
neOCampus-arduino
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GIS-neOCampus
neOSensor
neOCampus-arduino
Commits
cc14e9b8
Commit
cc14e9b8
authored
4 years ago
by
thiebolt
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
3f104be7
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arduinoIDE_esp8266_boards/boards.txt
+0
-7460
0 additions, 7460 deletions
arduinoIDE_esp8266_boards/boards.txt
deploy.sh
+69
-57
69 additions, 57 deletions
deploy.sh
with
69 additions
and
7517 deletions
arduinoIDE_esp8266_boards/boards.txt
deleted
100644 → 0
+
0
−
7460
View file @
3f104be7
This diff is collapsed.
Click to expand it.
deploy.sh
+
69
−
57
View file @
cc14e9b8
...
...
@@ -2,20 +2,14 @@
#
# Deployment script for neOCampus / neOSensor ESP32 based boards
#
# F.Thiebol
aug.20 initial release
# F.Thiebol
t
aug.20 initial release
#
#
# Global defs
ESP32_REV
=
${
ESP32_REV
:-
"1.0.4"
}
ESP32_DIR
=
${
ESP32_DIR
:-
"~/.arduino15/packages/esp32/hardware/esp32/
${
ESP32_REV
}
"
}
eval
ESP32_DIR
=
${
ESP32_DIR
}
ESP32_SRCDIR
=
"arduinoIDE_esp32_boards"
ESP8266_REV
=
${
ESP8266_REV
:-
"2.7.4"
}
ESP8266_REV
=
${
ESP32_REV
:-
"2.7.4"
}
ESP8266_DIR
=
${
ESP32_DIR
:-
"~/.arduino15/packages/esp8266/hardware/esp8266/
${
ESP8266_REV
}
"
}
eval
ESP8266_DIR
=
${
ESP32_DIR
}
ESP8266_SRCDIR
=
"arduinoIDE_esp8266_boards"
#
# function install
...
...
@@ -23,10 +17,70 @@ ESP8266_SRCDIR="arduinoIDE_esp8266_boards"
# $2: SDK_REV (e.g "2.7.4" for esp8266 "1.0.4" for esp32)
function
boards_install
()
{
[
$#
-ne
2
]
&&
{
return
1
;
}
ARCH
=
$1
SDK_REV
=
$2
SDK_DIR
=
"~/.arduino15/packages/
${
ARCH
,,
}
/hardware/
${
ARCH
,,
}
/
${
SDK_REV
}
"
eval
SDK_DIR
=
${
SDK_DIR
}
[
-d
${
SDK_DIR
}
]
||
{
echo
-e
"unable to find dir '
${
SDK_DIR
}
' ... aborting"
>
&2
;
return
1
;
}
echo
-e
"# Detected
${
ARCH
,,
}
SDK dir:"
printf
"%-80s
\n
"
"
${
SDK_DIR
}
"
echo
-e
"# -------------------------------------------------------- #"
sleep
1
SRC_DIR
=
"arduinoIDE_
${
ARCH
,,
}
_boards"
[
-d
${
SRC_DIR
}
]
||
{
echo
-e
"unable to find dir '
${
SRC_DIR
}
' ... aborting"
>
&2
;
return
1
;
}
#
# parse current variants directory
echo
-e
"# install boards #"
echo
-e
"# #"
_cpt
=
0
for
variant_dir
in
$(
/bin/ls
-d
${
SRC_DIR
}
/
*
)
;
do
# [sep.20] NOT TESTED !!
# is it really a variant dir ??
_variant_dir
=
${
variant_dir
#*/
}
_vdir
=
${
_variant_dir
%%/
}
[
-f
${
_vdir
}
/variant.h
]
||
{
continue
;
}
echo
-ne
"
${
_vdir
}
--> install
${
ARCH
,,
}
board [y/N]? : "
read
-e
-n
1 answer
[
"X
${
answer
,,
}
"
!=
"Xy"
]
&&
{
echo
-e
"cancelled!"
;
continue
;
}
# copy variant dir
_destdir
=
${
SDK_DIR
}
/variants/
rsync
-av
--delete
--dry-run
${
_vdir
}
${
_destdir
}
>
& /dev/null
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
#WARNING: unable to rsync
${
_vdir
}
in
${
_destdir
}
... continuing!"
>
&2
;
sleep
2
;
continue
;
}
rsync
-av
--delete
${
_vdir
}
${
_destdir
}
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
### ERROR while rsync of
${
_vdir
}
in
${
_destdir
}
... aborting!"
>
&2
;
exit
1
;
}
echo
-e
"
\t
successfully installed board '
${
_vdir
}
' :)"
((
_cpt++
))
done
echo
-e
"# #"
echo
-e
"# -------------------------------------------------------- #"
#[aug.20] some boards does not have variant defs!
#[ "X${_cpt}" == "X0" ] && { exit 0; }
#
# copy local defs files
echo
-e
"# copy local files #"
echo
-e
"# #"
for
local_file
in
$(
/bin/ls
${
SRC_DIR
}
/
*
local.txt
)
;
do
_local_file
=
${
local_file
#*/
}
if
[
-f
${
SDK_DIR
}
/
${
_local_file
}
]
;
then
echo
-ne
"overwrite existing
${
SDK_DIR
}
/
${
_local_file
}
file [y/N]? :"
read
-e
-n
1 answer
[
"X
${
answer
,,
}
"
!=
"Xy"
]
&&
{
echo
-e
"cancelled!"
;
continue
;
}
fi
cp
-af
${
local_file
}
${
SDK_DIR
}
/
>
& /dev/null
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
### ERROR while copying '
${
local_file
}
' file to '
${
SDK_DIR
}
' directory ... aborting!"
>
&2
;
exit
1
;
}
echo
-e
"
\t
successfully installed local file '
${
_local_file
}
'"
done
echo
-e
"# #"
echo
-e
"# -------------------------------------------------------- #"
return
0
}
TO BE CONTINUED
# usage
echo
-e
"
\n
############################################################"
...
...
@@ -35,54 +89,12 @@ echo -e "# neOCampus ESP8266/ESP32 boards installer #"
echo
-e
"# #"
echo
-e
"# -------------------------------------------------------- #"
# check if target directory exists
[
-d
${
ESP32_DIR
}
]
||
{
echo
-e
"###ERROR: unable to find dir '
${
ESP32_DIR
}
' ... aborting"
>
&2
;
exit
1
;
}
echo
-e
"# Detected esp32 install dir: #"
printf
"%-80s
\n
"
"
${
ESP32_DIR
}
"
echo
-e
"# -------------------------------------------------------- #"
sleep
1
# ESP32 boards
boards_install
"ESP32"
${
ESP32_REV
}
[
$?
-ne
0
]
&&
{
echo
-e
"
\n\t
failed to install additional ESP32 boards ?!?!"
>
&2
;
sleep
2
;
}
# parse current variants directory
echo
-e
"# install boards #"
echo
-e
"# #"
_cpt
=
0
for
variant_dir
in
$(
/bin/ls
-d
*
/
)
;
do
# is it really a variant dir ??
_vdir
=
${
variant_dir
%%/
}
[
-f
${
_vdir
}
/variant.h
]
||
{
continue
;
}
echo
-ne
"
${
_vdir
}
--> install esp32 board [y/N]? : "
read
-e
-n
1 answer
[
"X
${
answer
,,
}
"
!=
"Xy"
]
&&
{
echo
-e
"cancelled!"
;
continue
;
}
# copy variant dir
_destdir
=
${
ESP32_DIR
}
/variants/
rsync
-av
--delete
--dry-run
${
_vdir
}
${
_destdir
}
>
& /dev/null
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
#WARNING: unable to rsync
${
_vdir
}
in
${
_destdir
}
... continuing!"
>
&2
;
sleep
2
;
continue
;
}
rsync
-av
--delete
${
_vdir
}
${
_destdir
}
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
### ERROR while rsync of
${
_vdir
}
in
${
_destdir
}
... aborting!"
>
&2
;
exit
1
;
}
echo
-e
"
\t
successfully installed board '
${
_vdir
}
' :)"
((
_cpt++
))
done
echo
-e
"# #"
echo
-e
"# -------------------------------------------------------- #"
#[aug.20] some boards does not have variant defs!
#[ "X${_cpt}" == "X0" ] && { exit 0; }
# copy local defs files
echo
-e
"# copy local files #"
echo
-e
"# #"
for
local_file
in
$(
/bin/ls
*
local.txt
)
;
do
if
[
-f
${
ESP32_DIR
}
/
${
local_file
}
]
;
then
echo
-ne
"overwrite existing
${
ESP32_DIR
}
/
${
local_file
}
file [y/N]? :"
read
-e
-n
1 answer
[
"X
${
answer
,,
}
"
!=
"Xy"
]
&&
{
echo
-e
"cancelled!"
;
continue
;
}
fi
cp
-af
${
local_file
}
${
ESP32_DIR
}
/
>
& /dev/null
[
$?
-ne
0
]
&&
{
echo
-e
"
\n
### ERROR while copying '
${
local_file
}
' file to '
${
ESP32_DIR
}
' directory ... aborting!"
>
&2
;
exit
1
;
}
echo
-e
"
\t
successfully installed local file '
${
local_file
}
'"
done
echo
-e
"# #"
echo
-e
"# -------------------------------------------------------- #"
boards_install
"ESP8266"
${
ESP8266_REV
}
[
$?
-ne
0
]
&&
{
echo
-e
"
\n\t
failed to install additional ESP8266 boards ?!?!"
>
&2
;
sleep
2
;
}
# finialize
echo
-e
"
\n
You may restart your arduino toolchain to have your variants taken into account"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment