Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
installer
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
installer
Compare revisions
352407371caff5fc3e6e6c554ab6adf62d471d3e to 6a4802d55631fee7a8de07b4f0f87ebd7f2f115b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
redox-os/installer
Select target project
No results found
6a4802d55631fee7a8de07b4f0f87ebd7f2f115b
Select Git revision
Swap
Target
redox-os/installer
Select target project
redox-os/installer
Sag0Sag0/installer
microcolonel/installer
mich/installer
potatogim/installer
bruceadams/installer
rw_van/installer
carrot93/installer
Ivan/installer
josh_williams/installer
bjorn3/installer
freewilll/installer
Chocimier/installer
andypython/installer
4lDO2/installer
amyipdev/installer
coolreader18/installer
adi-g15/installer
enygmator/installer
josh/installer
20 results
352407371caff5fc3e6e6c554ab6adf62d471d3e
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Add flag to print filesystem size
· 6a4802d5
Jeremy Soller
authored
1 year ago
6a4802d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bin/installer.rs
+4
-1
4 additions, 1 deletion
src/bin/installer.rs
src/config/general.rs
+2
-0
2 additions, 0 deletions
src/config/general.rs
with
6 additions
and
1 deletion
src/bin/installer.rs
View file @
6a4802d5
...
...
@@ -18,6 +18,7 @@ fn main() {
let
mut
parser
=
ArgParser
::
new
(
4
)
.add_opt
(
"b"
,
"cookbook"
)
.add_opt
(
"c"
,
"config"
)
.add_flag
(
&
[
"filesystem-size"
])
.add_flag
(
&
[
"r"
,
"repo-binary"
])
.add_flag
(
&
[
"l"
,
"list-packages"
])
.add_flag
(
&
[
"live"
]);
...
...
@@ -51,7 +52,9 @@ fn main() {
config
.general.repo_binary
=
Some
(
true
);
}
if
parser
.found
(
"list-packages"
)
{
if
parser
.found
(
"filesystem-size"
)
{
println!
(
"{}"
,
config
.general.filesystem_size
.unwrap_or
(
0
));
}
else
if
parser
.found
(
"list-packages"
)
{
// List the packages that should be fetched or built by the cookbook
for
(
packagename
,
package
)
in
&
config
.packages
{
match
package
{
...
...
This diff is collapsed.
Click to expand it.
src/config/general.rs
View file @
6a4802d5
...
...
@@ -3,6 +3,7 @@ pub struct GeneralConfig {
pub
prompt
:
Option
<
bool
>
,
// Allow config to specify cookbook recipe or binary package as default
pub
repo_binary
:
Option
<
bool
>
,
pub
filesystem_size
:
Option
<
u32
>
,
//MiB
pub
efi_partition_size
:
Option
<
u32
>
,
//MiB
}
...
...
@@ -10,6 +11,7 @@ impl GeneralConfig {
pub
(
super
)
fn
merge
(
&
mut
self
,
other
:
GeneralConfig
)
{
self
.prompt
=
other
.prompt
.or
(
self
.prompt
);
self
.repo_binary
=
other
.repo_binary
.or
(
self
.repo_binary
);
self
.filesystem_size
=
other
.filesystem_size
.or
(
self
.filesystem_size
);
self
.efi_partition_size
=
other
.efi_partition_size
.or
(
self
.efi_partition_size
);
}
}
This diff is collapsed.
Click to expand it.