Skip to content

Commit

Permalink
Update source, not build, as Cargo.lock is now committed
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Jul 26, 2017
1 parent 2067c82 commit 7d06611
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
27 changes: 13 additions & 14 deletions cook.sh
Expand Up @@ -37,7 +37,6 @@ function op {
case "$2" in
dist)
op $1 prepare
op $1 update
op $1 build
op $1 stage
op $1 tar
Expand Down Expand Up @@ -94,6 +93,19 @@ function op {
rm -f source.tar
fi
;;
update)
pushd source > /dev/null
skip=0
if [ "$(type -t recipe_update)" = "function" ]
then
recipe_update
fi
if [ "$skip" -eq "0" ]
then
xargo update
fi
popd > /dev/null
;;
prepare)
rm -rf sysroot
mkdir sysroot
Expand Down Expand Up @@ -143,19 +155,6 @@ function op {
op $1 version
fi
;;
update)
pushd build > /dev/null
skip=0
if [ "$(type -t recipe_update)" = "function" ]
then
recipe_update
fi
if [ "$skip" -eq "0" ]
then
xargo update
fi
popd > /dev/null
;;
build)
pushd build > /dev/null
skip=0
Expand Down
2 changes: 1 addition & 1 deletion pkgutils
Submodule pkgutils updated 2 files
+1 −2 .gitignore
+626 −0 Cargo.lock
4 changes: 2 additions & 2 deletions repo.sh
Expand Up @@ -36,15 +36,15 @@ do
if [ ! -f "recipes/$recipe/stage.tar.gz" ]
then
echo -e "\033[01;38;5;155mrepo - building $recipe\033[0m" >&2
./cook.sh "$recipe" update build stage tar
./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_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" ]
then
echo -e "\033[01;38;5;155mrepo - rebuilding $recipe\033[0m" >&2
./cook.sh "$recipe" untar unstage update build stage tar
./cook.sh "$recipe" untar unstage build stage tar
else
echo -e "\033[01;38;5;155mrepo - $recipe up to date\033[0m" >&2
fi
Expand Down

0 comments on commit 7d06611

Please sign in to comment.