summaryrefslogtreecommitdiff
path: root/src/fullpkg/fullpkg
blob: 6d6153af39c000b7ecac7468919c6bb4283b8944 (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
34
#!/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'"
    echo ""
    exit 1

}

while getopts 'h' 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