mirror of
https://github.com/edu4rdshl/blackarch-devtools.git
synced 2026-07-17 23:24:47 +00:00
Remove unneeded commands.
This commit is contained in:
parent
ff4f4d3e3c
commit
55729d3d46
1 changed files with 33 additions and 22 deletions
|
|
@ -112,32 +112,43 @@ pub fn setup_chroot() {
|
||||||
.status()
|
.status()
|
||||||
.expect("Failed to retrieve strap.sh from blackarch.org");
|
.expect("Failed to retrieve strap.sh from blackarch.org");
|
||||||
if get_strap.success() {
|
if get_strap.success() {
|
||||||
let strap_perms = Command::new(&devtools_nspawn)
|
let strap_exec = Command::new(&devtools_nspawn)
|
||||||
.args(&[&chroot_root, "chmod", "+x", "strap.sh"])
|
.args(&[&chroot_root, "sh", "strap.sh"])
|
||||||
.status()
|
.status()
|
||||||
.expect("Failed to change permisions for strap.sh");
|
.expect("Failed to exec strap.sh");
|
||||||
if strap_perms.success() {
|
if strap_exec.success() {
|
||||||
let strap_exec = Command::new(&devtools_nspawn)
|
Command::new(&devtools_nspawn)
|
||||||
.args(&[&chroot_root, "sh", "strap.sh"])
|
.args(&[&chroot_root, "rm", "strap.sh"])
|
||||||
.status()
|
.status()
|
||||||
.expect("Failed to exec strap.sh");
|
.expect("Error deleting strap.sh from chroot environment.");
|
||||||
if strap_exec.success() {
|
writeln!(
|
||||||
Command::new(&devtools_nspawn)
|
coloring("yellow"),
|
||||||
.args(&[&chroot_root, "rm", "strap.sh"])
|
"Doing first sync of the chroot environment, it will take a while..."
|
||||||
.status()
|
)
|
||||||
.expect("Error deleting strap.sh from chroot environment.");
|
.unwrap();
|
||||||
writeln!(coloring("green"), "Chroot environment setup complete!")
|
sync_chroot();
|
||||||
.unwrap();
|
writeln!(coloring("green"), "Chroot environment setup complete!").unwrap();
|
||||||
} else {
|
} else {
|
||||||
writeln!(
|
writeln!(
|
||||||
coloring("red"),
|
coloring("red"),
|
||||||
"Can't install strap.sh into {}!",
|
"Can't install strap.sh into {}!",
|
||||||
&chroot_root
|
&chroot_root
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
writeln!(
|
||||||
|
coloring("red"),
|
||||||
|
"Failed to retrieve strap.sh from blackarch.org!"
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
writeln!(
|
||||||
|
coloring("red"),
|
||||||
|
"Failed to install base packages into chroot environment."
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
writeln!(
|
writeln!(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue