Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qthing
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
Container Registry
Model registry
Operate
Environments
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
Jens Nolte
qthing
Commits
d6139d72
Commit
d6139d72
authored
4 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Adapt build scripts for new project structure
parent
4c782c4e
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
Merge dev branch into master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/set-device
+13
-19
13 additions, 19 deletions
bin/set-device
bin/set-environment
+3
-4
3 additions, 4 deletions
bin/set-environment
default.nix
+1
-1
1 addition, 1 deletion
default.nix
with
17 additions
and
24 deletions
bin/set-device
+
13
−
19
View file @
d6139d72
#!/usr/bin/env
ba
sh
#!/usr/bin/env
z
sh
set
-e
set
-u
function
print_usage
{
print_usage
()
{
echo
"Usage: set-device [ DEVICE_NAME | DEVICE_DIR ]"
}
function
list_known_devices
{
list_known_devices
()
{
echo
"Known devices:"
ls
-1
devices |
while
read
f
;
do
if
[[
-d
"devices/
$f
"
&&
-f
"devices/
$f
/device_config.h"
&&
-f
"devices/
$f
/device_main.cpp"
]]
;
then
if
[[
-d
"devices/
$f
"
]]
;
then
echo
"
$f
"
fi
done
}
function
link_device_directory
{
if
[[
"
$1
"
==
/
*
]]
;
then
DIR
=
"
$1
"
else
DIR
=
"../
$1
"
fi
echo
"Linking main/device to
$DIR
"
rm
"main/device"
||
true
ln
-s
"
$DIR
"
"main/device"
touch
--no-create
"main/device/device_config.h"
touch
--no-create
"main/device/device_main.cpp"
link_device_directory
()
{
echo
"Linking main to
$1
"
ln
-snf
"
$1
"
"main"
touch
--no-create
main/
**
/
*
}
if
[[
-z
"
$1
"
]]
;
then
if
[[
$#
< 1
]]
;
then
print_usage
list_known_devices
elif
[[
-
f
"
$1
/device_config.h"
&&
-f
"
$1
/device_main.cpp
"
]]
;
then
elif
[[
-
d
"
$1
"
]]
;
then
echo
"Found device in directory
$1
"
link_device_directory
"
$1
"
elif
[[
-
f
"devices/
$1
/device_config.h"
&&
-f
"devices/
$1
/device_main.cpp
"
]]
;
then
elif
[[
-
d
"devices/
$1
"
]]
;
then
echo
"Found device
$1
in devices directory"
link_device_directory
"devices/
$1
"
else
echo
"Cannot find device
_config.h and device_main.cpp
in one of the following directories:"
echo
"Cannot find device in one of the following directories:"
echo
"
$1
"
echo
"devices/
$1
"
fi
This diff is collapsed.
Click to expand it.
bin/set-environment
+
3
−
4
View file @
d6139d72
...
...
@@ -17,10 +17,9 @@ function link_environment {
else
TARGET
=
"../
$1
"
fi
echo
"Linking main/environment.h to
$TARGET
"
rm
"main/environment.h"
||
true
ln
-s
"
$TARGET
"
"main/environment.h"
touch
--no-create
"main/environment.h"
echo
"Linking qthing/environment.h to
$TARGET
"
ln
-snf
"
$TARGET
"
"qthing/environment.h"
touch
--no-create
"qthing/environment.h"
}
if
[[
-z
"
$1
"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
default.nix
+
1
−
1
View file @
d6139d72
...
...
@@ -52,7 +52,7 @@ in rec {
shell
=
pkgs
.
stdenv
.
mkDerivation
{
name
=
"esp-idf-env"
;
buildInputs
=
qthingDependencies
;
buildInputs
=
qthingDependencies
++
[
pkgs
.
zsh
]
;
shellHook
=
shellSetup
;
};
...
...
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