echo"ERROR : You must run this script from the MySQL top-level directory"
exit1
fi
#
# Debug print of the status
#
print_debug()
{
for statement
do
if["$DEBUG"="1"];then
echo$statement
fi
done
}
#
# Usage of the script
#
show_usage()
{
echo"MySQL utility script to create a Windows binary package"
echo""
echo"This is intended to be used under Cygwin, and will generate"
echo"an archive named in the form mysql<suffix>-<version>-noinstall.zip"
echo"Takes the following arguments:"
echo""
echo" --dirname Directory to use for copying files"
echo" --extra Directory to get extra files from"
echo" --suffix Name to append to 'mysql' for this binary"
echo" --help Show this help message"
exit0
}
#
# Parse the input arguments
#
parse_arguments(){
for arg do
case"$arg" in
--debug)DEBUG=1;;
--extra=*)EXTRA=`echo"$arg"| sed -e "s;--extra=;;"`;;
--suffix=*)SUFFIX=`echo"$arg"| sed -e "s;--suffix=;;"`;;
--dirname=*)DIRNAME=`echo"$arg"| sed -e "s;--dirname=;;"`;;
--help) show_usage ;;
*)
echo"Unknown argument '$arg'"
exit1
;;
esac
done
}
parse_arguments "$@"
if[ -z "$DIRNAME"];then
$DIRNAME="dist"
fi
print_debug "Making directories"
mkdir $DIRNAME
$DIRNAME="$DIRNAME/mysql-$version"
mkdir $DIRNAME
for dir in bin lib lib/opt lib/debug Embedded Embedded/DLL Embedded/DLL/debug Embedded/DLL/release Embedded/static Embedded/static/release examples examples/libmysqltest