Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Freifunk Hochstift
Firmware
Commits
d005e923
Commit
d005e923
authored
9 years ago
by
Karsten Böddeker
Browse files
Options
Downloads
Patches
Plain Diff
Update corresponding scripts
parent
70a5260a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+13
-0
13 additions, 0 deletions
Makefile
build-version.sh
+26
-27
26 additions, 27 deletions
build-version.sh
docker-build.sh
+16
-14
16 additions, 14 deletions
docker-build.sh
with
55 additions
and
41 deletions
Makefile
0 → 100644
+
13
−
0
View file @
d005e923
all
:
LC_ALL
:=
C
LANG
:=
C
export
LC_ALL
LANG
GLUONDIR
:=
${
CURDIR
}
/src
include
$(GLUONDIR)/include/gluon.mk
include
$(GLUONDIR)/targets/targets.mk
list-targets
:
@
echo
'
$(
GLUON_TARGETS
)
'
This diff is collapsed.
Click to expand it.
build-version.sh
+
26
−
27
View file @
d005e923
#!/bin/bash
# (c) 2014-201
5
Freifunk
Paderborn <maschinenraum@paderborn
.freifunk.net>
# (c) 2014-201
6
Freifunk
Hochstift <kontakt@hochstift
.freifunk.net>
#
# calls build.sh with information found in given version
MY_DIR
=
$(
dirname
$0
)
MY_DIR
=
$(
readlink
-f
"
$MY_DIR
"
)
pushd
$MY_DIR
>
/dev/null
MY_DIR
=
$(
readlink
-f
"
$
{
MY_DIR
}
"
)
pushd
$
{
MY_DIR
}
>
/dev/null
.
functions.sh
version
=
$1
versionfile
=
"
${
MY_DIR
}
/versions/
${
version
}
"
[
-r
$versionfile
]
||
abort
"Failed to find the version '
$version
'."
[
-r
$
{
versionfile
}
]
||
abort
"Failed to find the version '
$
{
version
}
'."
[
-n
"
${
BROKEN
}
"
]
||
BROKEN
=
0
base
=
`
awk
'BEGIN { FS="=" } /^GLUON=([a-f0-9]+)(\s*#.+)?$/ { print $2; }'
$versionfile
|
awk
'BEGIN { FS="#" } { print $1; }'
`
branch
=
`
awk
'BEGIN { FS="=" } /^BRANCH=([a-z]+)$/ { print $2; }'
$versionfile
`
version
=
`
awk
'BEGIN { FS="=" } /^VERSION=([0-9\.\-+~a-z]+)$/ { print $2; }'
$versionfile
`
site_repo
=
`
awk
'BEGIN { FS="=" } /^SITE_REPO=([a-z]+)$/ { print $2; }'
$versionfile
`
site
=
`
awk
'BEGIN { FS="=" } /^SITE=([a-f0-9]+)(\s*#.+)?$/ { print $2; }'
$versionfile
|
awk
'BEGIN { FS="#" } { print $1; }'
`
targets
=
`
awk
'BEGIN { FS="=" } /^TARGETS=.+$/ { print $2; }'
$versionfile
`
ts
=
`
awk
'BEGIN { FS="=" } /^TS=.+$/ { print $2; }'
$versionfile
`
[
-z
"
$base
"
]
&&
abort
"Failed to parse Gluon base commit-id from version file."
[
-z
"
$branch
"
]
&&
abort
"Failed to parse branch name from version file."
[
-z
"
$version
"
]
&&
abort
"Failed to parse version from version file."
[
-z
"
$site_repo
"
]
&&
site_repo
=
"ffpb"
[
-z
"
$site
"
]
&&
abort
"Failed to parse site repo commit-id from version file."
[
-z
"
$ts
"
]
&&
abort
"Failed to parse timestamp from version file."
base
=
`
awk
'BEGIN { FS="=" } /^GLUON=([a-f0-9]+)(\s*#.+)?$/ { print $2; }'
${
versionfile
}
|
awk
'BEGIN { FS="#" } { print $1; }'
`
branch
=
`
awk
'BEGIN { FS="=" } /^BRANCH=([a-z]+)$/ { print $2; }'
${
versionfile
}
`
version
=
`
awk
'BEGIN { FS="=" } /^VERSION=([0-9\.\-+~a-z]+)$/ { print $2; }'
${
versionfile
}
`
site
=
`
awk
'BEGIN { FS="=" } /^SITE=([a-f0-9]+)(\s*#.+)?$/ { print $2; }'
${
versionfile
}
|
awk
'BEGIN { FS="#" } { print $1; }'
`
targets
=
`
awk
'BEGIN { FS="=" } /^TARGETS=.+$/ { print $2; }'
${
versionfile
}
`
ts
=
`
awk
'BEGIN { FS="=" } /^TS=.+$/ { print $2; }'
${
versionfile
}
`
[
-n
"
${
base
}
"
]
||
abort
"Failed to parse Gluon base commit-id from version file."
[
-n
"
${
branch
}
"
]
||
abort
"Failed to parse branch name from version file."
[
-n
"
${
version
}
"
]
||
abort
"Failed to parse version from version file."
[
-n
"
${
site
}
"
]
||
abort
"Failed to parse site repo commit-id from version file."
[
-n
"
${
targets
}
"
]
||
abort
"Failed to parse targets from version file"
[
-n
"
${
ts
}
"
]
||
abort
"Failed to parse timestamp from version file."
# remove all spaces from git-commit-ids
base
=
"
${
base
// /
}
"
site
=
"
${
site
// /
}
"
info
"Building
$branch
version '
$version
' again ..."
echo
" * Gluon base =
$base
"
echo
" * Site repo =
$site_repo
"
echo
" * Site commit=
$site
"
echo
" * Timestamp =
$ts
"
echo
" * Targets =
$targets
"
info
"Building
${
branch
}
version '
${
version
}
' again ..."
echo
" * Gluon base =
${
base
}
"
echo
" * Site commit=
${
site
}
"
echo
" * Timestamp =
${
ts
}
"
echo
" * Targets =
${
targets
}
"
echo
# invoke build script
if
[
"
$NO_DOCKER
"
==
"1"
]
;
then
BASE
=
"
$base
"
BRANCH
=
"
$branch
"
SITE
=
"
$site_repo
"
SITE_ID
=
"
$site
"
VERSION
=
"
$version
"
BUILD_TS
=
"
$ts
"
TARGETS
=
"
$targets
"
BROKEN
=
"
$BROKEN
"
./build.sh
if
[
"
$
{
NO_DOCKER
}
"
-eq
"1"
]
;
then
BASE
=
"
$
{
base
}
"
BRANCH
=
"
$
{
branch
}
"
SITE_ID
=
"
$
{
site
}
"
VERSION
=
"
$
{
version
}
"
BUILD_TS
=
"
$
{
ts
}
"
TARGETS
=
"
$
{
targets
}
"
BROKEN
=
"
$
{
BROKEN
}
"
./build.sh
else
BASE
=
"
$base
"
BRANCH
=
"
$branch
"
SITE
=
"
$site_repo
"
SITE_ID
=
"
$site
"
VERSION
=
"
$version
"
BUILD_TS
=
"
$ts
"
TARGETS
=
"
$targets
"
BROKEN
=
"
$BROKEN
"
./docker-build.sh
BASE
=
"
$
{
base
}
"
BRANCH
=
"
$
{
branch
}
"
SITE
=
"
$
{
site_repo
}
"
SITE_ID
=
"
$
{
site
}
"
VERSION
=
"
$
{
version
}
"
BUILD_TS
=
"
$
{
ts
}
"
TARGETS
=
"
$
{
targets
}
"
BROKEN
=
"
$
{
BROKEN
}
"
./docker-build.sh
fi
popd
>
/dev/null
#${MY_DIR}
This diff is collapsed.
Click to expand it.
docker-build.sh
+
16
−
14
View file @
d005e923
...
...
@@ -19,21 +19,23 @@ if [ running_in_docker -a "$(id -un)" == "build" ]; then
fi
MYDIR
=
"
$(
dirname
$0
)
"
MYDIR
=
"
$(
readlink
-f
$MYDIR
)
"
pushd
"
$MYDIR
"
>
/dev/null
MYDIR
=
"
$(
readlink
-f
$
{
MYDIR
}
)
"
pushd
"
$
{
MYDIR
}
"
>
/dev/null
# run the container with fixed hostname and mapped /code directory
docker run
-ti
-h
ffho-build
-v
"
$MYDIR
:/code"
\
--env
BUILD_TS
=
"
$BUILD_TS
"
\
--env
BASE
=
"
$BASE
"
\
--env
BRANCH
=
"
$BRANCH
"
\
--env
BROKEN
=
"
$BROKEN
"
\
--env
MAKEJOBS
=
"
$MAKEJOBS
"
\
--env
VERBOSE
=
"
$VERBOSE
"
\
--env
VERSION
=
"
$VERSION
"
\
--env
TARGETS
=
"
$TARGETS
"
\
--env
SITE
=
"
$SITE
"
\
--env
SITE_ID
=
"
$SITE_ID
"
\
docker run
-ti
-h
ffho-build
-v
"
${
MYDIR
}
:/code"
\
--env
BASE
=
"
${
BASE
}
"
\
--env
BRANCH
=
"
${
BRANCH
}
"
\
--env
VERSION
=
"
${
VERSION
}
"
\
--env
AUTOUPDATER
=
"
${
AUTOUPDATER
}
"
--env
BROKEN
=
"
${
BROKEN
}
"
\
--env
BUILD_TS
=
"
${
BUILD_TS
}
"
\
--env
DIRCLEAN
=
"
${
DIRCLEAN
}
"
\
--env
MAKEJOBS
=
"
${
MAKEJOBS
}
"
\
--env
PRIORITY
=
"
${
PRIORITY
}
"
\
--env
SITE_ID
=
"
${
SITE_ID
}
"
\
--env
TARGETS
=
"
${
TARGETS
}
"
\
--env
VERBOSE
=
"
${
VERBOSE
}
"
\
ffpb/build
popd
>
/dev/null
\ No newline at end of file
popd
>
/dev/null
#${MYDIR}
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