diff --git a/clean.sh b/clean.sh index 45c2e14a3..e26dba32a 100755 --- a/clean.sh +++ b/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}" diff --git a/fetch.sh b/fetch.sh index a3bc69c76..1ca153c51 100755 --- a/fetch.sh +++ b/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 diff --git a/unfetch.sh b/unfetch.sh index d8016a05f..6763ff824 100755 --- a/unfetch.sh +++ b/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