You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/usr/bin/env bash
- #
- # Build nsf as a deb package
- #
- # Author: donkey <anjingyu_ws@foxmail.com>
-
- CUR_DIR=$(cd `dirname $0`; pwd)
- PROJ_DIR=$(dirname $CUR_DIR)
-
- # 1. Check version and replace the corresponding item in DEBIAN/control
- # 2. Copy dist/nsf into DEBIAN/usr/local/bin
- # 3. Generate postinst script to execute required actions
-
- if [ ! -d "${PROJ_DIR}/DEBIAN/usr/local/bin" ]; then
- mkdir -p "${PROJ_DIR}/DEBIAN/usr/local/bin"
- fi
-
- cp "${PROJ_DIR]/dist/nsf" "${PROJ_DIR}/DEBIAN/usr/local/bin"
-
- cat <<EOF >> ${PROJ_DIR}/DEBIAN/postinst
- #!/bin/bash
- touch /root/touched
- EOF
- chmod 755 ${PROJ_DIR}/DEBIAN/postinst
-
- pushd `dirname $PROJ_DIR` 1>/dev/null 2>&1
- dpkg-deb --build $(basename `dirname $PROJ_DIR`)
- popd 1>/dev/null 2>&1
|