⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nwbootstrap

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻
字号:
#! /bin/sh# debug#set -x# stop on errorsset -epath=`dirname $0`# repository direcotryrepo_dir=`pwd`# build directorybuild_dir="$HOME/mydev"wine_build_dir="F:/mydev"# doc directorydoc_dir="$repo_dir/../mysqldoc"# inittarget_dir=""temp_dir=""revision=""rev=""build=""suffix=""mwenv=""# show usageshow_usage(){	cat << EOFusage: nwbootstrap [options]Exports a revision of the BitKeeper tree (nwbootstrap must be run inside adirectory of the BitKeeper tree to be used).  Creates the ChangeLog file.Adds the latest manual.texi from the mysqldoc BitKeeper tree.  Builds theLinux tools required for cross-platform builds.  Optionally, builds the binary distributions for NetWare.options:--build=<opt>               Build the binary distributions for NetWare,                            where <opt> is "standard", "debug", or "all"                            (default is to not build a binary distribution)                            --build-dir=<dir>           Export the BitKeeper tree to the <dir> directroy                            (default is "$build_dir")                            --doc-dir=<dir>             Use the mysqldoc BitKeeper tree located in the                            <dir> directory                            (default is parallel to current BitKeeper tree)                            --help                      Show this help information--revision=<rev>            Export the BitKeeper tree as of revision <rev>                            (default is the latest revision)                            --wine-build-dir=<dir>      Use the WINE directory <dir>, which should                            correspond to the --build-dir directory                            (default is "$wine_build_dir")examples:  nwbootstrap  nwbootstrap --revision=1.1594 --build=all    nwbootstrap --build-dir=/home/jdoe/dev --wine-build-dir=F:/devEOF	exit 0;}# parse argumentsfor arg do  case "$arg" in    --build-dir=*) build_dir=`echo "$arg" | sed -e "s;--build-dir=;;"` ;;    --wine-build-dir=*) wine_build_dir=`echo "$arg" | sed -e "s;--wine-build-dir=;;"` ;;    --revision=*) revision=`echo "$arg" | sed -e "s;--revision=;;"` ;;    --build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;;    --suffix=*) suffix=`echo "$arg" | sed -e "s;--suffix=;;"` ;;    --doc-dir=*) doc_dir=`echo "$arg" | sed -e "s;--doc-dir=;;"` ;;    *) show_usage ;;  esacdoneecho "starting build..."# check for bk and repo_dirbk help > /dev/nullrepo_dir=`bk root $repo_dir`cd $repo_dirdoc_dir="$repo_dir/../mysqldoc"# build temporary directorytemp_dir="$build_dir/mysql-$$.tmp"# export the bk treecommand="bk export";if test $revision; then command="$command -r$revision"; ficommand="$command $temp_dir"echo "exporting $repo_dir..."$command# determine versionversion=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < $temp_dir/configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`echo "version: $version"# build target directorytarget_dir="$build_dir/mysql-$version"# add suffixif test $suffixthen  target_dir="$target_dir-$suffix"fi# delete any old targetif test -d $target_dir.old; then rm -rf $target_dir.old; fi# rename old targetif test -d $target_dir; then mv -f $target_dir $target_dir.old; fi# rename directory to use versionmv $temp_dir $target_dir# create ChangeLogif test $revisionthen	rev=`bk changes -r..$revision -t -d':REV:' -n | head -2 | tail -1`else	rev=`bk changes -t -d':REV:' -n | head -1`fiecho "creating ChangeLog..."bk changes -v -r$rev..$revision > $target_dir/ChangeLog# add the latest manualif test -d $doc_dirthen	echo "adding the latest manual..."	install -m 644 $doc_dir/Docs/{manual,reservedwords}.texi $target_dir/Docs/fi# make files writeableecho "making files writable..."cd $target_dirchmod -R u+rw,g+rw .# edit the mvenv fileecho "updating the mwenv environment file..."mwenv="./netware/BUILD/mwenv"mv -f $mwenv $mwenv.orgsed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \	-e "s;BUILD_DIR;$build_dir;g" \  -e "s;VERSION;$version;g" $mwenv.org > $mwenvchmod +rwx $mwenv# edit the def file versionsecho "updating *.def file versions..."nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`for file in ./netware/*.defdo  mv -f $file $file.org  sed -e "s;VERSION.*;VERSION $nlm_version;g" $file.org > $file  rm $file.orgdone# create the libmysql.imp file in netware folder from libmysql/libmysql.def# fileecho "generating llibmysql.imp file..."awk 'BEGIN{x=0;}  END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {printf(",\n %s", $1);next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp# build linux toolsecho "compiling linux tools..."./netware/BUILD/compile-linux-tools# compileif test $buildthen	echo "compiling $build..."  ./netware/BUILD/compile-netware-$buildfiecho "done"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -