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
Commits
c2bae248
Commit
c2bae248
authored
7 years ago
by
Jeremy Soller
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3 from ids1024/package
Update for pkgutils refactoring
parents
7c7b30c1
160a7930
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
src/install.rs
+3
-4
3 additions, 4 deletions
src/install.rs
with
3 additions
and
4 deletions
src/install.rs
+
3
−
4
View file @
c2bae248
...
...
@@ -6,7 +6,7 @@ extern crate userutils;
use
self
::
rand
::
Rng
;
use
self
::
termion
::
input
::
TermRead
;
use
self
::
pkgutils
::
Repo
;
use
self
::
pkgutils
::
{
Repo
,
Package
}
;
use
std
::{
env
,
fs
};
use
std
::
io
::{
self
,
stderr
,
Write
};
...
...
@@ -67,7 +67,6 @@ fn prompt_password(prompt: &str, confirm_prompt: &str) -> Result<String, String>
fn
install_packages
(
config
:
&
Config
,
dest
:
&
str
,
cookbook
:
Option
<&
str
>
)
{
let
mut
repo
=
Repo
::
new
(
TARGET
);
repo
.add_remote
(
REMOTE
);
repo
.set_dest
(
dest
);
if
let
Some
(
cookbook
)
=
cookbook
{
let
status
=
Command
::
new
(
"./update-packages.sh"
)
...
...
@@ -87,12 +86,12 @@ fn install_packages(config: &Config, dest: &str, cookbook: Option<&str>) {
let
path
=
format!
(
"{}/{}/repo/{}/{}.tar"
,
env
::
current_dir
()
.unwrap
()
.to_string_lossy
(),
cookbook
,
TARGET
,
packagename
);
repo
.install_file
(
&
path
)
.unwrap
();
Package
::
from_path
(
&
path
)
.unwrap
()
.install
(
dest
)
.unwrap
();
}
}
else
{
for
(
packagename
,
_package
)
in
&
config
.packages
{
println!
(
"Installing package {}"
,
packagename
);
repo
.
install
(
&
packagename
)
.unwrap
();
repo
.
fetch
(
&
packagename
)
.unwrap
()
.install
(
dest
)
.unwrap
()
;
}
}
}
...
...
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