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()
|
||||
.expect("Failed to retrieve strap.sh from blackarch.org");
|
||||
if get_strap.success() {
|
||||
let strap_perms = Command::new(&devtools_nspawn)
|
||||
.args(&[&chroot_root, "chmod", "+x", "strap.sh"])
|
||||
let strap_exec = Command::new(&devtools_nspawn)
|
||||
.args(&[&chroot_root, "sh", "strap.sh"])
|
||||
.status()
|
||||
.expect("Failed to change permisions for strap.sh");
|
||||
if strap_perms.success() {
|
||||
let strap_exec = Command::new(&devtools_nspawn)
|
||||
.args(&[&chroot_root, "sh", "strap.sh"])
|
||||
.expect("Failed to exec strap.sh");
|
||||
if strap_exec.success() {
|
||||
Command::new(&devtools_nspawn)
|
||||
.args(&[&chroot_root, "rm", "strap.sh"])
|
||||
.status()
|
||||
.expect("Failed to exec strap.sh");
|
||||
if strap_exec.success() {
|
||||
Command::new(&devtools_nspawn)
|
||||
.args(&[&chroot_root, "rm", "strap.sh"])
|
||||
.status()
|
||||
.expect("Error deleting strap.sh from chroot environment.");
|
||||
writeln!(coloring("green"), "Chroot environment setup complete!")
|
||||
.unwrap();
|
||||
} else {
|
||||
writeln!(
|
||||
coloring("red"),
|
||||
"Can't install strap.sh into {}!",
|
||||
&chroot_root
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
.expect("Error deleting strap.sh from chroot environment.");
|
||||
writeln!(
|
||||
coloring("yellow"),
|
||||
"Doing first sync of the chroot environment, it will take a while..."
|
||||
)
|
||||
.unwrap();
|
||||
sync_chroot();
|
||||
writeln!(coloring("green"), "Chroot environment setup complete!").unwrap();
|
||||
} else {
|
||||
writeln!(
|
||||
coloring("red"),
|
||||
"Can't install strap.sh into {}!",
|
||||
&chroot_root
|
||||
)
|
||||
.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 {
|
||||
writeln!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue