mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fix for bug#5385 ("Text files have unix line break"):
Windows style line end \r\n on README, license, and similar essential plaintext files. scripts/make_win_src_distribution.sh: Some plain text files (which a Windows user might view in any editor) should have Windows style line end \r\n (bug#5385). The tool is changed to do a systematic pass over all files, find all relevant ones (especially "README*", "ChangeLog", "INSTALL*", license text), and adapt them. Included are two minor cleanups ("useless use of cat" avoided, variable setting moved to more sensible place).
This commit is contained in:
parent
f4295a0537
commit
616b7460aa
1 changed files with 14 additions and 12 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
version=@VERSION@
|
||||
export version
|
||||
SOURCE=`pwd`
|
||||
CP="cp -p"
|
||||
|
||||
DEBUG=0
|
||||
|
@ -24,6 +23,7 @@ if [ ! -f scripts/make_win_src_distribution ]; then
|
|||
echo "ERROR : You must run this script from the MySQL top-level directory"
|
||||
exit 1
|
||||
fi
|
||||
SOURCE=`pwd`
|
||||
|
||||
#
|
||||
# Check for source compilation/configuration
|
||||
|
@ -119,7 +119,7 @@ unix_to_dos()
|
|||
for arg do
|
||||
print_debug "Replacing LF -> CRLF from '$arg'"
|
||||
|
||||
cat $arg | awk '{sub(/$/,"\r");print}' > $arg.tmp
|
||||
awk '{sub(/$/,"\r");print}' < $arg > $arg.tmp
|
||||
rm -f $arg
|
||||
mv $arg.tmp $arg
|
||||
done
|
||||
|
@ -138,14 +138,6 @@ if [ -d $BASE ] ; then
|
|||
fi
|
||||
|
||||
$CP -r $SOURCE/VC++Files $BASE
|
||||
(
|
||||
find $BASE \( -name "*.dsp" -o -name "*.dsw" \) -and -not -path \*SCCS\* -print
|
||||
)|(
|
||||
while read v
|
||||
do
|
||||
unix_to_dos $v
|
||||
done
|
||||
)
|
||||
|
||||
#
|
||||
# Process version tags in InstallShield files
|
||||
|
@ -281,7 +273,6 @@ for i in COPYING ChangeLog README EXCEPTIONS-CLIENT\
|
|||
Docs/manual_toc.html Docs/manual.html \
|
||||
Docs/manual.txt Docs/mysqld_error.txt \
|
||||
Docs/INSTALL-BINARY Docs/internals.texi
|
||||
|
||||
do
|
||||
print_debug "Copying file '$i'"
|
||||
if [ -f $i ]
|
||||
|
@ -322,7 +313,18 @@ done
|
|||
./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new
|
||||
mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
|
||||
|
||||
unix_to_dos $BASE/README
|
||||
#
|
||||
# Search the tree for plain text files and adapt the line end marker
|
||||
#
|
||||
find $BASE \( -name "*.dsp" -o -name "*.dsw" -o -name "*.cnf" -o -name "*.ini" \
|
||||
-o -name COPYING -o -name ChangeLog -o -name EXCEPTIONS-CLIENT -o -name "INSTALL*" -o -name LICENSE -o -name "README*" \) -type f -print \
|
||||
| while read v
|
||||
do
|
||||
unix_to_dos $v
|
||||
done
|
||||
# File extension '.txt' matches too many other files, error messages etc.
|
||||
unix_to_dos $BASE/Docs/*.txt
|
||||
|
||||
mv $BASE/README $BASE/README.txt
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue