mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 05:44:17 +08:00
Only accept recipe name in shell scripts
Rather than recipe path.
This commit is contained in:
parent
bf026ddaf8
commit
87699a364e
12
clean.sh
12
clean.sh
@ -5,20 +5,14 @@ source config.sh
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
recipes="$(target/release/list_recipes --short)"
|
||||
else
|
||||
recipes="$@"
|
||||
fi
|
||||
|
||||
for recipe in $recipes
|
||||
for recipe_name in $recipes
|
||||
do
|
||||
if (echo "$recipe" | grep '.*/.*' >/dev/null); then
|
||||
recipe_name=$(basename "$recipe")
|
||||
recipe_path="$recipe"
|
||||
else
|
||||
recipe_name="$recipe"
|
||||
recipe_path=`target/release/find_recipe $recipe`
|
||||
fi
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
|
||||
echo -e "\033[01;38;5;215mcook - clean $recipe_name\033[0m"
|
||||
rm -rf "${ROOT}/$recipe_path/target/${TARGET}"
|
||||
|
||||
10
fetch.sh
10
fetch.sh
@ -22,15 +22,7 @@ then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
fi
|
||||
|
||||
for recipe_path in $recipes
|
||||
for recipe_name in $recipes
|
||||
do
|
||||
if (echo "$recipe_path" | grep '.*/.*' >/dev/null); then
|
||||
recipe_name=$(basename "$recipe_path")
|
||||
recipe_path="$recipe_path"
|
||||
else
|
||||
recipe_name="$recipe_path"
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
fi
|
||||
|
||||
target/release/cook --fetch-only "$recipe_name"
|
||||
done
|
||||
|
||||
13
unfetch.sh
13
unfetch.sh
@ -5,21 +5,16 @@ source config.sh
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
recipes="$(target/release/list_recipes)"
|
||||
recipes="$(target/release/list_recipes --short)"
|
||||
else
|
||||
recipes="$@"
|
||||
fi
|
||||
|
||||
for recipe in $recipes
|
||||
for recipe_name in $recipes
|
||||
do
|
||||
if (echo "$recipe" | grep '.*/.*' >/dev/null); then
|
||||
recipe_name=$(basename "$recipe")
|
||||
recipe_path="$recipe"
|
||||
else
|
||||
recipe_name="$recipe"
|
||||
recipe_path=`target/release/find_recipe $recipe`
|
||||
fi
|
||||
recipe_path=`target/release/find_recipe $recipe_name`
|
||||
|
||||
echo -e "\033[01;38;5;215mcook - unfetch $recipe_name\033[0m"
|
||||
rm -rfv "$recipe_path"/source "$recipe_path"/source.tar
|
||||
done
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user