1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/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