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
925eaba3
Commit
925eaba3
authored
7 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Move update-packages into repo command, use source timestamps
parent
1fb6beca
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config.sh
+9
-0
9 additions, 0 deletions
config.sh
cook.sh
+3
-28
3 additions, 28 deletions
cook.sh
repo.sh
+57
-0
57 additions, 0 deletions
repo.sh
update-packages.sh
+0
-40
0 additions, 40 deletions
update-packages.sh
with
69 additions
and
68 deletions
config.sh
0 → 100755
+
9
−
0
View file @
925eaba3
#!/bin/bash -e
# Configuration
export
TARGET
=
x86_64-unknown-redox
# Automatic variables
ROOT
=
"
$(
cd
`
dirname
"
$0
"
`
&&
pwd
)
"
REPO
=
"
$ROOT
/repo/
$TARGET
"
export
CC
=
"
$ROOT
/libc-artifacts/gcc.sh"
This diff is collapsed.
Click to expand it.
cook.sh
+
3
−
28
View file @
925eaba3
#!/bin/bash
#!/bin/bash
-e
# Configuration
export
TARGET
=
x86_64-unknown-redox
# Automatic variables
ROOT
=
"
$(
cd
`
dirname
"
$0
"
`
&&
pwd
)
"
REPO
=
"
$ROOT
/repo/
$TARGET
"
export
CC
=
"
$ROOT
/libc-artifacts/gcc.sh"
source
config.sh
# Variables to be overriden by recipes
export
BINDIR
=
bin
export
CARGOFLAGS
=
set
-e
function
usage
{
echo
"cook.sh
$1
<op>"
>
&2
echo
" dist"
>
&2
...
...
@@ -222,24 +214,7 @@ function op {
if
[
-n
"
$1
"
]
then
if
[
"
$1
"
=
"repo"
]
then
if
[
!
"
$COOK_QUIET
"
=
"1"
]
then
echo
-e
"
\0
33[01;38;5;215mcook - repo
\0
33[0m"
>
&2
fi
echo
"[packages]"
>
"
$REPO
/repo.toml"
for
toml
in
"
$REPO
/"
*
".toml"
do
package
=
"
$(
basename
"
$toml
"
.toml
)
"
if
[
"
$package
"
!=
"repo"
]
then
version
=
"
$(
grep
version
"
$toml
"
|
cut
-d
'='
-f2-
)
"
echo
"
$package
=
$version
"
>>
"
$REPO
/repo.toml"
fi
done
elif
[
-d
"
$ROOT
/recipes/
$1
"
]
if
[
-d
"
$ROOT
/recipes/
$1
"
]
then
cd
"
$ROOT
/recipes/
$1
"
source
recipe.sh
...
...
This diff is collapsed.
Click to expand it.
repo.sh
0 → 100755
+
57
−
0
View file @
925eaba3
#!/bin/bash -e
source
config.sh
if
[
$#
=
0
]
then
recipes
=
"
$(
ls
-1
recipes
)
"
else
recipes
=
"
$@
"
fi
for
recipe
in
$recipes
do
if
[
!
-d
"recipes/
$recipe
/source"
]
then
echo
-e
"
\0
33[01;38;5;215mrepo - fetching and updating
$recipe
\0
33[0m"
>
&2
./cook.sh
"
$recipe
"
fetch
fi
if
[
!
-f
"recipes/
$recipe
/stage.tar"
]
then
echo
-e
"
\0
33[01;38;5;215mrepo - building
$recipe
\0
33[0m"
>
&2
./cook.sh
$recipe
update build stage
tar
else
TIME_SOURCE
=
"
$(
find recipes/
$recipe
/source
-printf
"%Ts
\n
"
|
sort
-nr
|
head
-n
1
)
"
TIME_STAGE
=
"
$(
stat
-c
"%Y"
recipes/
$recipe
/stage.tar
)
"
if
[
"
$TIME_SOURCE
"
-ge
"
$TIME_STAGE
"
]
then
echo
-e
"
\0
33[01;38;5;215mrepo - rebuilding
$recipe
\0
33[0m"
>
&2
./cook.sh
"
$recipe
"
untar unstage update build stage
tar
else
echo
-e
"
\0
33[01;38;5;215mrepo -
$recipe
up to date
\0
33[0m"
>
&2
fi
fi
done
for
recipe
in
$recipes
do
if
[
"recipes/
$recipe
/stage.tar"
-nt
"
$REPO
/
$recipe
.tar"
]
then
echo
-e
"
\0
33[01;38;5;215mrepo - publishing
$recipe
\0
33[0m"
>
&2
./cook.sh
$recipe
publish
fi
done
echo
-e
"
\0
33[01;38;5;215mrepo - generating repo.toml
\0
33[0m"
>
&2
echo
"[packages]"
>
"
$REPO
/repo.toml"
for
toml
in
"
$REPO
/"
*
".toml"
do
package
=
"
$(
basename
"
$toml
"
.toml
)
"
if
[
"
$package
"
!=
"repo"
]
then
version
=
"
$(
grep
version
"
$toml
"
|
cut
-d
'='
-f2-
)
"
echo
"
$package
=
$version
"
>>
"
$REPO
/repo.toml"
fi
done
This diff is collapsed.
Click to expand it.
update-packages.sh
deleted
100755 → 0
+
0
−
40
View file @
1fb6beca
#!/bin/bash
set
-e
if
[
$#
=
0
]
then
recipes
=
$(
ls
-1
recipes
)
else
recipes
=
$@
fi
publish
=
""
for
recipe
in
$recipes
do
if
[
!
-f
"recipes/
$recipe
/stage.tar"
]
then
echo
"
$recipe
: building..."
./cook.sh
$recipe
dist
publish
=
"
${
publish
}
$recipe
"
else
oldver
=
$(
COOK_QUIET
=
1 ./cook.sh
$recipe
gitversion
)
./cook.sh
$recipe
fetch
newver
=
$(
COOK_QUIET
=
1 ./cook.sh
$recipe
gitversion
)
if
[
"
$oldver
"
=
"
$newver
"
]
then
echo
"
$recipe
: up to date (version
$newver
)."
else
echo
"
$recipe
: updating
$oldver
->
$newver
..."
./cook.sh
$recipe
unstage untar dist
publish
=
"
${
publish
}
$recipe
"
fi
fi
done
for
recipe
in
$publish
do
./cook.sh
$recipe
publish
done
./cook.sh repo
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