#!/bin/sh -ef # Display a package's dependencies ## SYNOPSIS: ## .Nm ## .Op Ar pkg ## DESCRIPTION: ## .Nm ## displays the dependencies of the given ## .Em installed package . ## If no package name is given, ## .Nm ## will use the name of the current directory as the package. ## see: cpt-repodepends.1 case "$1" in --help|-h) printf 'usage: %s [pkg]\n' "${0##*/}" exit 0 ;; '') set -- "${PWD##*/}" esac cpt-list "$1" >/dev/null cat "$CPT_ROOT/var/db/cpt/installed/$1/depends" 2>/dev/null ||: