aboutsummaryrefslogtreecommitdiff
path: root/contrib/cpt-repodepends
blob: 0babe69d4ea3669bbda5821059c0cf1eb39f59df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -e
# Display a package's dependencies in the repository

case "$1" in
    --help|-h)
        printf '%s\n' "usage: ${0##*/} [pkg]"
        exit 0
        ;;
    '') set -- "${PWD##*/}"
esac

cpt-search "$1" >/dev/null
cat "$(cpt-search --single "$1")/depends" 2>/dev/null