Add slashes after source and build to support symlinks

This commit is contained in:
Jeremy Soller 2017-09-16 12:05:01 -06:00
parent b991094bbd
commit d1c72f4de2

10
repo.sh
View File

@ -13,19 +13,19 @@ fi
for recipe in $recipes
do
if [ ! -d "recipes/$recipe/source" ]
if [ ! -d "recipes/$recipe/source/" ]
then
echo -e "\033[01;38;5;215mrepo - fetching $recipe\033[0m" >&2
./cook.sh "$recipe" fetch
fi
if [ ! -d "recipes/$recipe/build" ]
if [ ! -d "recipes/$recipe/build/" ]
then
echo -e "\033[01;38;5;155mrepo - preparing $recipe\033[0m" >&2
./cook.sh "$recipe" prepare
else
TIME_SOURCE="$($FIND recipes/$recipe/source -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
TIME_BUILD="$($FIND recipes/$recipe/build -type f -not -path '*/.git*' -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_BUILD="$($FIND recipes/$recipe/build/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
if [ "$TIME_SOURCE" -gt "$TIME_BUILD" ]
then
echo -e "\033[01;38;5;155mrepo - repreparing $recipe\033[0m" >&2
@ -38,7 +38,7 @@ do
echo -e "\033[01;38;5;155mrepo - building $recipe\033[0m" >&2
./cook.sh "$recipe" build stage tar
else
TIME_BUILD="$($FIND recipes/$recipe/build -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
TIME_BUILD="$($FIND recipes/$recipe/build/ -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
TIME_STAGE="$($STAT -c "%Y" recipes/$recipe/stage.tar.gz)"
TIME_RECIPE="$($FIND recipes/$recipe/{recipe.sh,*.patch} -printf '%Ts\n' | sort -nr | head -n 1)"
if [ "$TIME_BUILD" -gt "$TIME_STAGE" -o "$TIME_RECIPE" -gt "$TIME_STAGE" ]