summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2007-07-23 21:58:48 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2007-07-23 21:58:48 (GMT)
commitef509c15cc5b9f5c08c006c0facdd71b48f189e8 (patch)
tree1adf09e8d5c49c5bb27f813d430c795cd72f347f
parent74973f8d031ffaac276eef4fe922b808c536d63c (diff)
downloadmxe-ef509c15cc5b9f5c08c006c0facdd71b48f189e8.zip
mxe-ef509c15cc5b9f5c08c006c0facdd71b48f189e8.tar.gz
mxe-ef509c15cc5b9f5c08c006c0facdd71b48f189e8.tar.bz2
new action: --dist (creates README, ChangeLog and SourceTGZ, makes --list obsolete)
-rw-r--r--.hgignore2
-rwxr-xr-xbuild_mingw_cross_env.sh44
2 files changed, 32 insertions, 14 deletions
diff --git a/.hgignore b/.hgignore
index 8a98e0d..324a1d4 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,3 +1,5 @@
+^README$
+^ChangeLog$
^download/
^src/
^usr/
diff --git a/build_mingw_cross_env.sh b/build_mingw_cross_env.sh
index 08354e9..0cad33d 100755
--- a/build_mingw_cross_env.sh
+++ b/build_mingw_cross_env.sh
@@ -23,10 +23,6 @@ set -ex
# <no action>
# same as '--download', followed by '--build'.
#
-# --list
-# list all supported packages and their versions to
-# be built.
-#
# --new-versions
# retrieve the new version numbers of all packages
# (modifies the script in-place, use with caution!)
@@ -45,12 +41,16 @@ set -ex
# (allows fast testing of new additions to the script,
# needs a prepared mingw_cross_env.tar.gz archive
# or a previous '--build' run)
-#---
-
-
-#---
-# Copyright (c) Volker Grabsch <vog@notjusthosting.com>
-# Rocco Rutte <pdmef@gmx.net>
+#
+# --dist
+# build a source distribution package
+#
+#
+# Copyright
+# =========
+#
+# (c) Volker Grabsch <vog@notjusthosting.com>
+# Rocco Rutte <pdmef@gmx.net>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -153,12 +153,28 @@ case "$1" in
exit 0
;;
--list)
- # transform all VERSION_xxx declaration lines of this script
set - -x
+ exit 0
+ ;;
+--dist)
+ sed -n 's/^#$\|^# //p; /SOFTWARE\./ q' "$0" >README
+ echo >>README
+ echo >>README
+ echo "List of Packages" >>README
+ echo "================" >>README
+ echo >>README
awk <"$0" '
BEGIN { FS="^VERSION_|=" }
/^VERSION/ { printf "%-13s %s\n", $2, $3 }' |
- sort
+ sort >>README
+ hg log -v --style changelog >ChangeLog
+ VERSION=`$SED -n 's/.*(\([a-z0-9.-]*\))$/\1/p' "$0" | head -1`
+ test -n "$VERSION"
+ rm -rf "mingw_cross_env-$VERSION"
+ mkdir "mingw_cross_env-$VERSION"
+ cp "$0" README ChangeLog "mingw_cross_env-$VERSION/"
+ tar cfv - "mingw_cross_env-$VERSION" | gzip -9 >"mingw_cross_env-$VERSION.tar.gz"
+ rm -rf "mingw_cross_env-$VERSION"
exit 0
;;
--new-versions|--download|--build|--build-experimental)
@@ -167,8 +183,8 @@ case "$1" in
*)
# display the first comments of this script as help message
set - -x
- $SED -n '/(c)/ Q; s/\(^$\|^#$\|^# \)//p' "$0" |
- more
+ echo
+ $SED -n '/^# Copyright$/ Q; s/^#$\|^# //p' "$0" | more
exit 1
;;
esac