diff --git a/fetch.sh b/fetch.sh index a6b7b67cf..dd7481ae8 100755 --- a/fetch.sh +++ b/fetch.sh @@ -6,10 +6,7 @@ source config.sh recipes="" for arg in "${@:1}" do - if [ "$arg" == "--nonstop" ] - then - set +e - elif [ "$arg" == "--offline" ] + if [ "$arg" == "--offline" ] then export COOKBOOK_OFFLINE="1" else @@ -17,7 +14,4 @@ do fi done -for recipe_name in $recipes -do - target/release/cook --fetch-only "$recipe_name" -done +target/release/cook --fetch-only $recipes diff --git a/repo.sh b/repo.sh index c0125c978..5e0f98810 100755 --- a/repo.sh +++ b/repo.sh @@ -12,15 +12,12 @@ do if [ "$arg" == "--appstream" ] then APPSTREAM="1" - elif [ "$arg" == "--debug" ] - then - DEBUG=--debug elif [ "$arg" == "--with-package-deps" ] then - COOK_OPT=--with-package-deps + COOK_OPT+=" --with-package-deps" elif [ "$arg" == "--nonstop" ] then - set +e + COOK_OPT+=" --nonstop" elif [ "$arg" == "--offline" ] then export COOKBOOK_OFFLINE="1" @@ -29,10 +26,7 @@ do fi done -for recipe in $recipes -do - target/release/cook $COOK_OPT "$recipe" -done +target/release/cook $COOK_OPT $recipes repo="$ROOT/repo/$TARGET" mkdir -p "$repo" diff --git a/src/bin/cook.rs b/src/bin/cook.rs index ca2e4484b..70a186a3f 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -928,7 +928,7 @@ EOF -Wno-dev \ "${COOKBOOK_CMAKE_FLAGS[@]}" \ "$@" - + "${COOKBOOK_NINJA}" -j"${COOKBOOK_MAKE_JOBS}" DESTDIR="${COOKBOOK_STAGE}" "${COOKBOOK_NINJA}" install -j"${COOKBOOK_MAKE_JOBS}" } @@ -996,7 +996,7 @@ function cookbook_meson { let post_script = r#"# Common post script # Strip binaries -for dir in "${COOKBOOK_STAGE}/bin" "${COOKBOOK_STAGE}/usr/bin" +for dir in "${COOKBOOK_STAGE}/bin" "${COOKBOOK_STAGE}/usr/bin" do if [ -d "${dir}" ] && [ -z "${COOKBOOK_NOSTRIP}" ] then @@ -1005,7 +1005,7 @@ do done # Remove libtool files -for dir in "${COOKBOOK_STAGE}/lib" "${COOKBOOK_STAGE}/usr/lib" +for dir in "${COOKBOOK_STAGE}/lib" "${COOKBOOK_STAGE}/usr/lib" do if [ -d "${dir}" ] then @@ -1282,6 +1282,7 @@ fn main() { let mut fetch_only = false; let mut with_package_deps = false; let mut quiet = false; + let mut nonstop = false; let mut recipe_names = Vec::new(); for arg in env::args().skip(1) { match arg.as_str() { @@ -1290,6 +1291,7 @@ fn main() { "--with-package-deps" if matching => with_package_deps = true, "--fetch-only" if matching => fetch_only = true, "-q" | "--quiet" if matching => quiet = true, + "--nonstop" => nonstop = true, _ => recipe_names.push(arg.try_into().expect("Invalid package name")), } } @@ -1370,7 +1372,9 @@ fn main() { style::Reset, err, ); - process::exit(1); + if !nonstop { + process::exit(1); + } } } }