mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
make_win_src_distribution.sh:
Clean up script, add needed modifications to generate a complete 4.0 Windows source package scripts/make_win_src_distribution.sh: Clean up script, add needed modifications to generate a complete 4.0 Windows source package
This commit is contained in:
@ -98,15 +98,29 @@ parse_arguments "$@"
|
|||||||
|
|
||||||
for i in $TMP $TMPDIR $TEMPDIR $TEMP /tmp
|
for i in $TMP $TMPDIR $TEMPDIR $TEMP /tmp
|
||||||
do
|
do
|
||||||
if [ "$i" ]; then
|
if [ "$i" ]; then
|
||||||
print_debug "Setting TMP to '$i'"
|
print_debug "Setting TMP to '$i'"
|
||||||
TMP=$i
|
TMP=$i
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
# Convert argument file from unix to DOS text
|
||||||
|
#
|
||||||
|
|
||||||
|
unix_to_dos()
|
||||||
|
{
|
||||||
|
for arg do
|
||||||
|
print_debug "Replacing LF -> CRLF from '$arg'"
|
||||||
|
|
||||||
|
sed -e 's/$/\r/' $arg > $arg.tmp
|
||||||
|
rm -f $arg
|
||||||
|
mv $arg.tmp $arg
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a tmp dest directory to copy files
|
# Create a tmp dest directory to copy files
|
||||||
@ -121,16 +135,11 @@ fi
|
|||||||
|
|
||||||
$CP -r $SOURCE/VC++Files $BASE
|
$CP -r $SOURCE/VC++Files $BASE
|
||||||
(
|
(
|
||||||
find $BASE \( -name "*.dsp" -o -name "*.dsw" \) -and -not -path \*SCCS\* -print
|
find $BASE \( -name "*.dsp" -o -name "*.dsw" -o -name "*.txt" \) -and -not -path \*SCCS\* -print
|
||||||
)|(
|
)|(
|
||||||
while read v
|
while read v
|
||||||
do
|
do
|
||||||
print_debug "Replacing LF -> CRLF from '$v'"
|
unix_to_dos $v
|
||||||
|
|
||||||
# ^M -> type CTRL V + CTRL M
|
|
||||||
cat $v | sed 's/
|
|
||||||
//' | sed 's/$/
|
|
||||||
/' > $v.tmp
|
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -147,7 +156,7 @@ rm -r -f "$BASE/share/Makefile.am"
|
|||||||
# Clean up if we did this from a bk tree
|
# Clean up if we did this from a bk tree
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
if [ -d $BASE/SCCS ]
|
||||||
then
|
then
|
||||||
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
|
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
|
||||||
fi
|
fi
|
||||||
@ -169,9 +178,9 @@ copy_dir_files()
|
|||||||
mkdir $BASE/$arg
|
mkdir $BASE/$arg
|
||||||
fi
|
fi
|
||||||
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
|
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
|
||||||
fi
|
README INSTALL* LICENSE
|
||||||
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def \
|
do
|
||||||
README INSTALL* LICENSE
|
if [ -f $i ]
|
||||||
then
|
then
|
||||||
$CP $SOURCE/$arg/$i $BASE/$arg/$i
|
$CP $SOURCE/$arg/$i $BASE/$arg/$i
|
||||||
fi
|
fi
|
||||||
@ -195,21 +204,19 @@ copy_dir_dirs() {
|
|||||||
|
|
||||||
for arg do
|
for arg do
|
||||||
|
|
||||||
for arg do
|
cd $SOURCE
|
||||||
|
(
|
||||||
basedir=$arg
|
find $arg -type d \
|
||||||
|
-and -not -path \*SCCS\* \
|
||||||
if [ ! -d $BASE/$arg ]; then
|
-and -not -path \*.deps\* \
|
||||||
mkdir $BASE/$arg
|
-and -not -path \*autom4te.cache -print
|
||||||
fi
|
)|(
|
||||||
|
while read v
|
||||||
copy_dir_files $arg
|
do
|
||||||
|
copy_dir_files $v
|
||||||
cd $SOURCE/$arg/
|
done
|
||||||
for i in *
|
)
|
||||||
do
|
|
||||||
if [ -d $SOURCE/$basedir/$i ] && [ "$i" != "SCCS" ]; then
|
|
||||||
copy_dir_files $basedir/$i
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,11 +261,11 @@ for i in COPYING COPYING.LIB ChangeLog README \
|
|||||||
INSTALL-WIN-SOURCE \
|
INSTALL-WIN-SOURCE \
|
||||||
Docs/manual_toc.html Docs/manual.html \
|
Docs/manual_toc.html Docs/manual.html \
|
||||||
Docs/manual.txt Docs/mysqld_error.txt \
|
Docs/manual.txt Docs/mysqld_error.txt \
|
||||||
Docs/manual_toc.html Docs/manual.html \
|
Docs/INSTALL-BINARY
|
||||||
Docs/manual.txt Docs/mysqld_error.txt \
|
|
||||||
do
|
do
|
||||||
print_debug "Copying file '$i'"
|
print_debug "Copying file '$i'"
|
||||||
do
|
if [ -f $i ]
|
||||||
then
|
then
|
||||||
$CP $i $BASE/$i
|
$CP $i $BASE/$i
|
||||||
fi
|
fi
|
||||||
@ -284,11 +291,14 @@ done
|
|||||||
|
|
||||||
./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp
|
./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp
|
||||||
|
|
||||||
|
unix_to_dos $BASE/README
|
||||||
|
mv $BASE/README $BASE/README.txt
|
||||||
|
|
||||||
#
|
#
|
||||||
# Initialize the initial data directory
|
# Initialize the initial data directory
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
if [ -f scripts/mysql_install_db ]; then
|
||||||
print_debug "Initializing the 'data' directory"
|
print_debug "Initializing the 'data' directory"
|
||||||
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
|
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
|
||||||
fi
|
fi
|
||||||
@ -349,9 +359,9 @@ which_1 ()
|
|||||||
# Create the result zip/tar file
|
# Create the result zip/tar file
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
set_tarzip_options()
|
||||||
{
|
{
|
||||||
set_tarzip_options()
|
for arg
|
||||||
do
|
do
|
||||||
if [ "$arg" = "tar" ]; then
|
if [ "$arg" = "tar" ]; then
|
||||||
ZIPFILE1=gnutar
|
ZIPFILE1=gnutar
|
||||||
|
Reference in New Issue
Block a user