Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Show more breadcrumbs
cellframe
celllframe-node
Merge requests
!70
Something went wrong on our end
Support 2649
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support 2649
support-2649
into
master
Overview
0
Commits
11
Pipelines
0
Changes
63
Merged
alexandr.kravchenko
requested to merge
support-2649
into
master
5 years ago
Overview
0
Commits
11
Pipelines
0
Changes
8
Expand
Merging build scripts into master branch
👍
0
👎
0
Merge request reports
Viewing commit
24c77d5d
Prev
Next
Show latest version
8 files
+
61
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
24c77d5d
fixed build scripts
· 24c77d5d
alexandr.kravchenko
authored
5 years ago
prod_build/general/chroot_wrap.sh
0 → 100755
+
47
−
0
Options
#!/bin/bash
export_variables
()
{
IFS
=
$'
\n
'
for
variable
in
$(
cat
prod_build/
$platform
/conf/
*
)
;
do
[
-z
$1
]
&&
export
$(
echo
"
$variable
"
|
sed
's/\"//g'
)
||
export
-n
$(
echo
$variable
|
cut
-d
'='
-f1
)
done
}
CHROOT_PREFIX
=
"builder"
CHROOTS_PATH
=
$1
PLATFORMS
=
$2
PKG_FORMAT
=
$3
SRC_PATH
=
$4
JOB
=
$5
cd
$SRC_PATH
echo
"Platforms are
$PLATFORMS
"
for
platform
in
$PLATFORMS
;
do
export_variables
IFS
=
' '
PKG_TYPE
=
$(
echo
$PKG_FORMAT
|
cut
-d
' '
-f1
)
#Check if chroots are present
echo
$HOST_DISTR_VERSIONS
echo
$HOST_ARCH_VERSIONS
[
-e
prod_build/
$platform
/scripts/pre-build.sh
]
&&
prod_build/
$platform
/scripts/pre-build.sh
$CHROOT_PREFIX
#For actions not in chroot (version update)
for
distr
in
$HOST_DISTR_VERSIONS
;
do
for
arch
in
$HOST_ARCH_VERSIONS
;
do
if
[
-e
$CHROOTS_PATH
/
$CHROOT_PREFIX
-
$distr
-
$arch
]
;
then
schroot
-c
$CHROOT_PREFIX
-
$distr
-
$arch
--
launcher.sh prod_build/
$platform
/scripts/
$JOB
.sh
"
$PKG_TYPE
"
||
errcode
=
$?
# echo "schroot stub $PKG_TYPE"
else
echo
"chroot
$CHROOT_PREFIX
-
$distr
-
$arch
not found. You should install it first"
fi
done
done
[
-e
prod_build/
$platform
/scripts/post-build.sh
]
&&
prod_build/
$platform
/scripts/post-build.sh
#For post-build actions not in chroot (global publish)
PKG_FORMAT
=
$(
echo
$PKG_FORMAT
|
cut
-d
' '
-f2-
)
# export_variables clean
done
#[ $(mount | grep "/run/schroot/mount") ] && sudo umount -l /run/schroot/mount && sudo rm -r /run/schroot/mount/* #Removing mountpoint odds.
cd
$wd
Loading