Skip to content

Commit

Permalink
bootstrap/gcc/vars.sh: new file (externalize variables from build.sh …
Browse files Browse the repository at this point in the history
…to allow resumable bootstrap)

bootstrap/gcc: source ./vars.sh
lib.sh: bootstrap () : skip build of package when packages/$DISTVER.zip is already present and print a Warning
  • Loading branch information
Barry committed Apr 3, 2018
1 parent 2560eb1 commit 5c58ff9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap/gcc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e
source ../../lib.sh
TASK=build

DISTVER="gcc"
source ./vars.sh

package_init "$@"

Expand Down
6 changes: 6 additions & 0 deletions bootstrap/gcc/vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Olivier Kaloudoff <olivier.kaloudoff@gmail.com>
# 2018
#

DISTVER="gcc"
7 changes: 7 additions & 0 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ function bootstrap()
do
if [ -d "$dir" ] && [ -e "$dir/build.sh" ]
then
[ -f "$dir/vars.sh" ] && {
. $dir/vars.sh
[ -f ../packages/$DISTVER.zip ] && {
echo "Warning: skipping build of $DISTVER (file packages/$DISTVER.zip already exists) "
continue;
}
}
echo "Building $dir"
cd "$dir"
./build.sh $SUBTASKFLAG $SUBTASK
Expand Down

0 comments on commit 5c58ff9

Please sign in to comment.