Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cookbook
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
redox-os
cookbook
Commits
b991094b
Commit
b991094b
authored
7 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix tabulation, allow recipe override of DEBUG
parent
92fc1056
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cook.sh
+21
-21
21 additions, 21 deletions
cook.sh
with
21 additions
and
21 deletions
cook.sh
+
21
−
21
View file @
b991094b
...
...
@@ -7,6 +7,7 @@ source config.sh
# Variables to be overriden by recipes
export
BINDIR
=
bin
export
CARGOFLAGS
=
export
DEBUG
=
if
[
!
"
$(
uname
-s
)
"
=
"Redox"
]
then
...
...
@@ -114,17 +115,17 @@ function op {
popd
>
/dev/null
;;
prepare
)
rm
-rf
sysroot
mkdir
sysroot
rm
-rf
sysroot
mkdir
sysroot
if
[
${#
BUILD_DEPENDS
}
-gt
0
]
then
pushd
$ROOT
./repo.sh
"
${
BUILD_DEPENDS
[@]
}
"
popd
./repo.sh
"
${
BUILD_DEPENDS
[@]
}
"
popd
for
i
in
"
${
BUILD_DEPENDS
[@]
}
"
do
do
pkg
--target
=
$TARGET
install
--root
sysroot
"
$REPO
/
$i
.tar.gz"
done
fi
...
...
@@ -139,7 +140,7 @@ function op {
;;
unprepare
)
rm
-rf
build
rm
-rf
sysroot
rm
-rf
sysroot
;;
version
)
pushd
build
>
/dev/null
...
...
@@ -171,7 +172,7 @@ function op {
fi
release_flag
=
"--release"
if
[
"
$
cargo_build_debug_mode
"
==
1
]
if
[
"
$
DEBUG
"
==
1
]
then
release_flag
=
fi
...
...
@@ -192,7 +193,7 @@ function op {
fi
release_flag
=
"--release"
if
[
"
$
cargo_build_debug_mode
"
==
1
]
if
[
"
$
DEBUG
"
==
1
]
then
release_flag
=
fi
...
...
@@ -229,24 +230,24 @@ function op {
if
[
"
$skip
"
-eq
"0"
]
then
#TODO xargo install --root "../stage" $CARGOFLAGS
if
[
"
$cargo_build_debug_mode
"
==
1
]
then
build
=
debug
else
build
=
release
fi
if
[
"
$DEBUG
"
==
1
]
then
build
=
debug
else
build
=
release
fi
bins
=
"
$(
find target/
$TARGET
/
$build
/
-maxdepth
1
-type
f
!
-name
'*.*'
)
"
if
[
-n
"
$bins
"
]
then
mkdir
-p
"../stage/
$BINDIR
"
for
bin
in
$bins
do
if
[
"
$
cargo_build_debug_mode
"
==
1
]
then
if
[
"
$
DEBUG
"
==
1
]
then
cp
-v
"
$bin
"
"../stage/
$BINDIR
/
$(
basename
$bin
)
"
else
else
strip
-v
"
$bin
"
-o
"../stage/
$BINDIR
/
$(
basename
$bin
)
"
fi
fi
done
fi
fi
...
...
@@ -288,13 +289,12 @@ then
cd
"
$ROOT
/recipes/
$1
"
source
recipe.sh
ops
=()
cargo_build_debug_mode
=
ops
=()
for
arg
in
"
${
@
:2
}
"
do
if
[
"
$arg
"
==
"--debug"
]
then
cargo_build_debug_mode
=
1
DEBUG
=
1
else
ops[
${#
ops
[@]
}
]=
"
$arg
"
fi
...
...
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