summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-25 14:17:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-25 14:17:48 +0200
commit879a40d7a6c56bb9b369d4553255c538a3d80e06 (patch)
treebfb5bce451fd4083b8faaa2cc6059b3dee3eb9b1
parentc92bdb935c34f9bd108ba3f7d388c48bd9ba045f (diff)
Update stage scripts (install scripts, forwarded configurations)
-rwxr-xr-xstage11
-rwxr-xr-xstage-pkg14
2 files changed, 22 insertions, 3 deletions
diff --git a/stage b/stage
index d4b5272..40d5bee 100755
--- a/stage
+++ b/stage
@@ -160,19 +160,26 @@ checksum_line "build2-mingw-$v-x86_64-windows.tar.xz"
#checksum_line "build2-baseutils-$v-i686-windows.zip"
#checksum_line "build2-mingw-$v-i686-windows.tar.xz"
-# Prepare install script/batch files.
+# Prepare install script/batch files and then append their checksums to
+# toolchain.sha256.
#
case "$mode" in
-q) o=--queue ;;
-p) o= ;;
*) o=--stage ;;
esac
-private/install/prepare "$o" "$dist_src"
+
+scripts=($(private/install/prepare "$o" "$dist_src"))
+
+for f in "${scripts[@]}"; do
+ checksum_line "$f"
+done
if [ "$mode" = "-p" ]; then
exit 0
fi
+
# Sync the distribution.
#
# Note that we do the distribution first so that the toolchain changes are
diff --git a/stage-pkg b/stage-pkg
index 5420e3c..af63f54 100755
--- a/stage-pkg
+++ b/stage-pkg
@@ -80,6 +80,18 @@ function dist() # <group> <dir>
{
local o="$repo_dir/$1"
local b="$(basename $2)"
+ local d="$2-default"
+
+ # If *-default/ exists, use that (old style out of tree configuration).
+ # Otherwise, use the source directory itself (new style forwarded
+ # configuration).
+ #
+ if ! test -d "$d"; then
+ d="$2"
+ if ! test -d "$d"; then
+ error "neither $2-default nor $2 exist"
+ fi
+ fi
mkdir -p "$o"
@@ -89,7 +101,7 @@ function dist() # <group> <dir>
rm -f "$o/$b"-*
fi
- b "dist($2-default/)" "config.dist.archives=$owd/$o/tar.gz"
+ b "dist($d/)" "config.dist.archives=$owd/$o/tar.gz"
}
for d in "${dirs[@]}"; do