summaryrefslogtreecommitdiff
path: root/fullpkg
blob: bccd81670f7fb74ade384a4233577a7212c8dc94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# set -x # uncomment for debug
# Builds packages from ABS recursively. It tries to find dependencies that
# aren't built or need update and then makepkg them in order.

usage() {

    echo "cd to a dir containing a PKGBUILD and run:"
    echo "$0 [build_dir]"
    echo ""
    echo "This script will check dependencies, build them if possible "
    echo "and stage the packages on it's repo."
    echo ""
    echo "OPTIONS:"
    echo " -h           : this message."
    echo ""
    echo "Wrapper for \`fullpkg-find' and \`fullpkg-build'"
    exit 1

}

while getopts 'haA:l:nm:' arg; do
    case "$arg" in
        h) usage ;;
    esac
done

shift $(( OPTIND - 1 ))

build_dir="${1:-$(mktemp -d /tmp/fullpkg.XXXXXX)}"
fullpkg-find "$build_dir" && fullpkg-build -N "$build_dir"

exit 0