source: wspkg/freebsd/freebsd.ports.sh @ 4a0c481

Last change on this file since 4a0c481 was 4a0c481, checked in by Ting-Wei Lan <lantw44@…>, 8 years ago

將所有資料檔移出這個 repo,讓資料檔和 script 分開管理

  • Property mode set to 100755
File size: 552 bytes
Line 
1#!/bin/sh
2
3msg () {
4        echo "$@" 1>&2
5}
6
7[ -z "$1" ] && msg "Usage: $0 list_file" && exit 1
8: ${FREEBSD_VERSION:="`uname -r | sed 's|^\([0-9]*\).*$|\1|'`"}
9: ${PORTSDIR:="/usr/ports"}
10index="${PORTSDIR}/INDEX-${FREEBSD_VERSION}"
11
12shdir="$(dirname "$0")"
13: ${shdir:="."}
14
15msg "==> FreeBSD version is ${FREEBSD_VERSION}"
16msg "==> FreeBSD ports tree is ${PORTSDIR}"
17msg "==> FreeBSD ports index file is ${index}"
18
19msg "==> Running freebsd.ports.find"
20if "${shdir}/freebsd.ports.find" "$1" "${index}"; then
21        msg "==> Done!"
22else
23        msg "==> Failed"
24        exit 1
25fi
Note: See TracBrowser for help on using the repository browser.