#!/bin/sh set -eu ensure_pre_was_loaded portdir=$repodir/ports/$pkg/ workdir=$repodir/out/ports/$pkg/ downdir=$repodir/cache/ports/ mkdir -p $workdir $downdir cd $workdir case ${1:-help} in fetch) fetch ;; build) build ;; clean) clean ;; install) install ;; relink) relink ;; *) echo "bad usage, see ports/post"; false ;; esac