📄 mktarball.sh
字号:
#!/usr/bin/env bashif [ -z "$1" ]; then echo Must have destination tarball name as argument exit 1fiTARBALL="$1"BUILD_ROOT=~/tmp/NAVBUILD_prefix=/usr/local/nav# Clear stuff out of the wayrm ${TARBALL}rm -rf ${BUILD_ROOT}echo Creating build root at ${BUILD_ROOT}mkdir -p ${BUILD_ROOT}# Build the thingecho Building...autoconf./configure --prefix=${_prefix}makemake DESTDIR=${BUILD_ROOT} install# Grab some extra files that aren't part of the build yetextra=`find bin/ -name '*.sh'`for file in $extrado install -v -m 755 -D $file ${BUILD_ROOT}${_prefix}/$filedone# Some chmod fixeschmod 755 ${BUILD_ROOT}${_prefix}/bin/arplogger.plchmod g+w ${BUILD_ROOT}${_prefix}/etc/*chmod 755 ${BUILD_ROOT}${_prefix}/etc/init.d/*# Tarball itoldwd=$PWDcd ${BUILD_ROOT}${_prefix}tar cvzf ${TARBALL} --owner=root --group=nav *mv ${TARBALL} $oldwdecho "Tarball created ($TARBALL)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -