diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2014-03-19 00:32:40 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2014-03-19 00:32:40 +0800 |
commit | 47f0a815d9c3a72426b662ae0089c0da64a83708 (patch) | |
tree | 25127be35e55c5c39f0f9a372760001b6ad99cec /freebsd.install.sh | |
parent | 9dc3874339ba5e17576ed6cf1b0a2bbc5994a7a9 (diff) | |
download | wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar.gz wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar.bz2 wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar.lz wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar.xz wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.tar.zst wspkg-47f0a815d9c3a72426b662ae0089c0da64a83708.zip |
更新 FreeBSD meta-ports 安裝 script
Diffstat (limited to 'freebsd.install.sh')
-rwxr-xr-x | freebsd.install.sh | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/freebsd.install.sh b/freebsd.install.sh index 29dfb7f..a55e1bd 100755 --- a/freebsd.install.sh +++ b/freebsd.install.sh @@ -11,32 +11,11 @@ msg_and_mkdir () { } : ${PORTSDIR:="/usr/ports"} -if [ '!' -d "${PORTSDIR}/local" ]; then +[ '!' -d "${PORTSDIR}/local" ] && \ msg_and_mkdir "${PORTSDIR}/local" - - echo "=> Generating ${PORTSDIR}/local/Makefile" 2>&1 - cat << EOF > "${PORTSDIR}/local/Makefile" -# \$FreeBSD\$ -# - - COMMENT = Local ports - - SUBDIR += 217 - -.include <bsd.port.subdir.mk> -EOF - - echo "=> Generating ${PORTSDIR}/local/Makefile.inc" 2>&1 - cat << EOF > "${PORTSDIR}/local/Makefile.inc" -# $FreeBSD$ -# - -PKGNAMEPREFIX?= local- - -# Make sure we have the correct origin registered -PKGCATEGORY= local -EOF - -fi +[ '!' -f "${PORTSDIR}/local/Makefile" ] && \ + msg_and_copy "freebsd.local.Makefile" "${PORTSDIR}/local/Makefile" +[ '!' -f "${PORTSDIR}/local/Makefile.inc" ] && \ + msg_and_copy "freebsd.local.Makefile.inc" "${PORTSDIR}/local/Makefile.inc" msg_and_copy "freebsd.out/217" "${PORTSDIR}/local" |