mirror of
https://github.com/edu4rdshl/blackarch-devtools.git
synced 2026-07-17 23:24:47 +00:00
Sync in every action and make update optional.
This commit is contained in:
parent
fd84ddcf4c
commit
69d7863ae6
3 changed files with 8 additions and 32 deletions
13
src/cli.yml
13
src/cli.yml
|
|
@ -11,11 +11,6 @@ args:
|
|||
long: setup
|
||||
help: Setup the clean chroot environment (automatically setup blackarch keyring).
|
||||
takes_value: false
|
||||
- update:
|
||||
short: u
|
||||
long: update
|
||||
help: Update BlackArch Linux chroot environment.
|
||||
takes_value: false
|
||||
- build:
|
||||
short: b
|
||||
long: build
|
||||
|
|
@ -53,10 +48,10 @@ args:
|
|||
help: Build package files that aren't available in repos. You can specify it multiple times.
|
||||
multiple: true
|
||||
takes_value: true
|
||||
- clean:
|
||||
short: c
|
||||
long: clean
|
||||
help: Clean chroot environment before building.
|
||||
- update:
|
||||
short: u
|
||||
long: update
|
||||
help: Update chroot environment before building.
|
||||
takes_value: false
|
||||
- verbose:
|
||||
short: v
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ pub fn update_chroot_packages() {
|
|||
|
||||
pub fn build_package() {
|
||||
sync_chroot();
|
||||
update_chroot_packages();
|
||||
let devtools_makechrootpkg = get_vars("makechrootpkg");
|
||||
let chroot_dir = get_vars("chroot_dir");
|
||||
let blackarch_instance = get_vars("blackarch_instance");
|
||||
|
|
|
|||
18
src/main.rs
18
src/main.rs
|
|
@ -12,12 +12,7 @@ fn main() {
|
|||
if matches.is_present("setup") {
|
||||
functions::setup_chroot();
|
||||
} else if matches.is_present("build") {
|
||||
if matches.is_present("clean") {
|
||||
functions::sync_chroot();
|
||||
functions::build_package();
|
||||
} else {
|
||||
functions::build_package();
|
||||
}
|
||||
} else if matches.is_present("update") {
|
||||
functions::update_chroot_packages();
|
||||
} else if matches.is_present("test") {
|
||||
|
|
@ -29,22 +24,9 @@ fn main() {
|
|||
.value_of("executable")
|
||||
.expect("Failed to convert in a valid String")
|
||||
.to_string();
|
||||
if matches.is_present("clean") {
|
||||
functions::sync_chroot();
|
||||
functions::test_package(&package, &executable);
|
||||
} else {
|
||||
functions::test_package(&package, &executable);
|
||||
}
|
||||
} else if matches.is_present("install-missing") {
|
||||
if matches.is_present("clean") {
|
||||
functions::sync_chroot();
|
||||
let missing_deps: Vec<&str> = matches.values_of("install-missing").unwrap().collect();
|
||||
functions::build_package_with_missing_deps(&missing_deps.as_slice());
|
||||
} else {
|
||||
let missing_deps: Vec<&str> = matches.values_of("install-missing").unwrap().collect();
|
||||
functions::build_package_with_missing_deps(&missing_deps.as_slice());
|
||||
}
|
||||
} else if matches.is_present("clean") {
|
||||
functions::sync_chroot();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue