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

📄 update_version

📁 xorp源码hg
💻
字号:
#!/bin/sh#-----------------------------------------------------------------------# Change the version number of the library. This changes the number in# every file that it is known to appear in.## Usage:#  update_version major minor micro#-----------------------------------------------------------------------usage="$0 major minor micro"if [ $# -ne 3 ]; then  echo $usage  exit 1fi# Get the three components of the version number.major="$1"minor="$2"micro="$3"# Everything will need to be reconfigured after this change, so# discard any existing configuration.make distclean 2>/dev/null# Check that the version components are all positive integers.for c in $major $minor $micro; do  if echo "$c" | awk '{exit $1 ~ /^[0-9]+$/}'; then    echo 'Version number components must all be positive integers.'    exit 1  fidone## Update the version number in the configure.in script.#ed -s configure.in << EOF/^MAJOR_VER=\"[0-9][0-9]*\"/ s/^.*$/MAJOR_VER=\"$major\"//^MINOR_VER=\"[0-9][0-9]*\"/ s/^.*$/MINOR_VER=\"$minor\"//^MICRO_VER=\"[0-9][0-9]*\"/ s/^.*$/MICRO_VER=\"$micro\"/wqEOFif which autoconf 1>/dev/null 2>&1; then  autoconfelse  echo 'Note that autoconf needs to be run.'fi## Update the version number in the libtecla header file script.#ed -s libtecla.h << EOF/^#define TECLA_MAJOR_VER [0-9][0-9]*/ s/^.*$/#define TECLA_MAJOR_VER $major//^#define TECLA_MINOR_VER [0-9][0-9]*/ s/^.*$/#define TECLA_MINOR_VER $minor//^#define TECLA_MICRO_VER [0-9][0-9]*/ s/^.*$/#define TECLA_MICRO_VER $micro/wqEOF## Update the version number in the README file.#ed -s README << EOF/version [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]* / s/version [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/version $major.$minor.$micro/wqEOF## Update the version number in the html index file.#ed -s html/index.html << EOF/version [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\./ s/version [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/version $major.$minor.$micro/g/libtecla-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\./ s/libtecla-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\./libtecla-$major.$minor.$micro./gwqEOF

⌨️ 快捷键说明

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