summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <joerg@mysql.com>2005-03-10 21:13:46 +0100
committerunknown <joerg@mysql.com>2005-03-10 21:13:46 +0100
commit33f9d926f4ddb57d0b5a5a99565cd261bf828ccf (patch)
tree99d68b6850b1c725f39ce8f53df7e6655be6c9ef /scripts
parent20ab3dc9df740ba5f77514ffa1de38cf686c58ec (diff)
downloadmariadb-git-33f9d926f4ddb57d0b5a5a99565cd261bf828ccf.tar.gz
Correct "make_win_src_distribution" to not introduce additional directory layers,
adapt the Windows build files accordingly. VC++Files/tests/mysql_client_test.dsp: As the directory structure on Windows now resembles that on Unix (no more "tests/tests", by the correction in "make_win_src_distribution.sh"), the location of "mysql_client_test.*" has changed. Adapt the build tools accordingly. VC++Files/tests/mysql_client_test_ia64.dsp: As the directory structure on Windows now resembles that on Unix (no more "tests/tests", by the correction in "make_win_src_distribution.sh"), the location of "mysql_client_test.*" has changed. Adapt the build tools accordingly. scripts/make_win_src_distribution.sh: 1) The semantics of "cp -R src targ" depend on the (non)existence of "targ". By simply doing "$CP -R $i $BASE/$i", the directory hierarchy below $BASE differed from the source for each "$i" that already existed as a target directory. This is now prevented by checking the existence and adapting the command. 2) Comment where "$BASE" (the target directory) comes into existence. 3) Introduce an "abort" function as a start point for more sanity checks, use it.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_win_src_distribution.sh34
1 files changed, 25 insertions, 9 deletions
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index b52cc3799aa..036ed6fcc93 100644
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -16,12 +16,25 @@ OUTTAR="0"
OUTZIP="0"
#
+# An "abort" function taking a variable number of strings (one per line)
+#
+
+abort()
+{
+ for line
+ do
+ echo "$line"
+ done
+ exit 1
+}
+
+
+#
# This script must run from MySQL top directory
#
if [ ! -f scripts/make_win_src_distribution ]; then
- echo "ERROR : You must run this script from the MySQL top-level directory"
- exit 1
+ abort "ERROR : You must run this script from the MySQL top-level directory"
fi
SOURCE=`pwd`
@@ -30,9 +43,8 @@ SOURCE=`pwd`
#
if [ ! -f sql/sql_yacc.cc ]; then
- echo "ERROR : Sorry, you must run this script after the complete build,"
- echo " hope you know what you are trying to do !!"
- exit 1
+ abort "ERROR : Sorry, you must run this script after the complete build," \
+ " hope you know what you are trying to do !!"
fi
#
@@ -86,9 +98,7 @@ parse_arguments() {
--tar) OUTTAR=1 ;;
--zip) OUTZIP=1 ;;
--help) show_usage ;;
- *)
- echo "Unknown argument '$arg'"
- exit 1
+ *) abort "Unknown argument '$arg'"
;;
esac
done
@@ -138,6 +148,7 @@ if [ -d $BASE ] ; then
fi
$CP -r $SOURCE/VC++Files $BASE
+# This includes an implicit 'mkdir $BASE' !
#
# Process version tags in InstallShield files
@@ -310,7 +321,12 @@ do
print_debug "Copying directory '$i'"
if [ -d $i ]
then
- $CP -R $i $BASE/$i
+ if [ -d $BASE/$i ]
+ then
+ $CP -R $i $BASE
+ else
+ $CP -R $i $BASE/$i
+ fi
fi
done