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
7e8c72d8
Commit
7e8c72d8
authored
7 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/redox-os/cookbook
parents
7e314025
150f00df
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
repo.sh
+14
-5
14 additions, 5 deletions
repo.sh
with
14 additions
and
5 deletions
repo.sh
+
14
−
5
View file @
7e8c72d8
...
@@ -4,11 +4,20 @@ shopt -s nullglob
...
@@ -4,11 +4,20 @@ shopt -s nullglob
source
config.sh
source
config.sh
if
[
$#
=
0
]
recipes
=()
for
arg
in
"
${
@
:1
}
"
do
if
[
"
$arg
"
==
"--debug"
]
then
DEBUG
=
--debug
else
recipes[
${#
recipes
[@]
}
]=
"
$arg
"
fi
done
if
[
${#
recipes
[@]
}
=
0
]
then
then
recipes
=
"
$(
ls
-1
recipes
)
"
recipes
=
"
$(
ls
-1
recipes
)
"
else
recipes
=
"
$@
"
fi
fi
for
recipe
in
$recipes
for
recipe
in
$recipes
...
@@ -36,7 +45,7 @@ do
...
@@ -36,7 +45,7 @@ do
if
[
!
-f
"recipes/
$recipe
/stage.tar.gz"
]
if
[
!
-f
"recipes/
$recipe
/stage.tar.gz"
]
then
then
echo
-e
"
\0
33[01;38;5;155mrepo - building
$recipe
\0
33[0m"
>
&2
echo
-e
"
\0
33[01;38;5;155mrepo - building
$recipe
\0
33[0m"
>
&2
./cook.sh
"
$recipe
"
build stage
tar
./cook.sh
"
$recipe
"
build stage
tar
$DEBUG
else
else
TIME_BUILD
=
"
$(
$FIND
recipes/
$recipe
/build/
-type
f
-not
-path
'*/.git*'
-printf
"%Ts
\n
"
|
sort
-nr
|
head
-n
1
)
"
TIME_BUILD
=
"
$(
$FIND
recipes/
$recipe
/build/
-type
f
-not
-path
'*/.git*'
-printf
"%Ts
\n
"
|
sort
-nr
|
head
-n
1
)
"
TIME_STAGE
=
"
$(
$STAT
-c
"%Y"
recipes/
$recipe
/stage.tar.gz
)
"
TIME_STAGE
=
"
$(
$STAT
-c
"%Y"
recipes/
$recipe
/stage.tar.gz
)
"
...
@@ -44,7 +53,7 @@ do
...
@@ -44,7 +53,7 @@ do
if
[
"
$TIME_BUILD
"
-gt
"
$TIME_STAGE
"
-o
"
$TIME_RECIPE
"
-gt
"
$TIME_STAGE
"
]
if
[
"
$TIME_BUILD
"
-gt
"
$TIME_STAGE
"
-o
"
$TIME_RECIPE
"
-gt
"
$TIME_STAGE
"
]
then
then
echo
-e
"
\0
33[01;38;5;155mrepo - rebuilding
$recipe
\0
33[0m"
>
&2
echo
-e
"
\0
33[01;38;5;155mrepo - rebuilding
$recipe
\0
33[0m"
>
&2
./cook.sh
"
$recipe
"
untar unstage build stage
tar
./cook.sh
"
$recipe
"
untar unstage build stage
tar
$DEBUG
else
else
echo
-e
"
\0
33[01;38;5;155mrepo -
$recipe
up to date
\0
33[0m"
>
&2
echo
-e
"
\0
33[01;38;5;155mrepo -
$recipe
up to date
\0
33[0m"
>
&2
fi
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