diff --git a/fetch.sh b/fetch.sh new file mode 100755 index 0000000000000000000000000000000000000000..a1f111092996f9b91bb9b23adfc44aca1e01dd77 --- /dev/null +++ b/fetch.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +source config.sh + +if [ $# = 0 ] +then + recipes="$(ls -1 recipes)" +else + recipes="$@" +fi + +for recipe in $recipes +do + echo -e "\033[01;38;5;215mfetch - fetching $recipe\033[0m" >&2 + ./cook.sh "$recipe" fetch +done diff --git a/repo.sh b/repo.sh index 0c94fd7b026496165517e25f39dffc5e9d9c0ef4..5c042fdf32d52e4543f3ae332d44c89b7dc7cbd7 100755 --- a/repo.sh +++ b/repo.sh @@ -11,18 +11,12 @@ fi for recipe in $recipes do - if [ ! -d "recipes/$recipe/source" ] - then - echo -e "\033[01;38;5;215mrepo - fetching and updating $recipe\033[0m" >&2 - ./cook.sh "$recipe" fetch - fi - if [ ! -f "recipes/$recipe/stage.tar" ] then echo -e "\033[01;38;5;215mrepo - building $recipe\033[0m" >&2 ./cook.sh $recipe update build stage tar else - TIME_SOURCE="$(find recipes/$recipe/source -printf "%Ts\n" | sort -nr | head -n 1)" + TIME_SOURCE="$(find recipes/$recipe/source -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)" TIME_STAGE="$(stat -c "%Y" recipes/$recipe/stage.tar)" if [ "$TIME_SOURCE" -ge "$TIME_STAGE" ] then