mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-19 19:34:18 +08:00
42 lines
804 B
Bash
Executable File
42 lines
804 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
source config.sh
|
|
|
|
recipes=""
|
|
for arg in "${@:1}"
|
|
do
|
|
if [ "$arg" == "--nonstop" ]
|
|
then
|
|
set +e
|
|
elif [ "$arg" == "--offline" ]
|
|
then
|
|
export COOKBOOK_OFFLINE="1"
|
|
else
|
|
recipes+=" $arg"
|
|
fi
|
|
done
|
|
|
|
if [ "$recipes" == "" ]
|
|
then
|
|
recipes="$(target/release/list_recipes)"
|
|
fi
|
|
|
|
for recipe_path in $recipes
|
|
do
|
|
if (echo "$recipe_path" | grep '.*/.*' >/dev/null); then
|
|
recipe_name=$(basename "$recipe_path")
|
|
recipe_path="recipes/$recipe_path"
|
|
else
|
|
recipe_name="$recipe_path"
|
|
recipe_path=`target/release/find_recipe $recipe_name`
|
|
fi
|
|
|
|
if [ -e "$recipe_path/recipe.toml" ]
|
|
then
|
|
target/release/cook --fetch-only "$recipe_name"
|
|
else
|
|
./cook.sh "$recipe_name" fetch
|
|
fi
|
|
done
|