aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-build
blob: eaf884911b1af99c50cd155f897b7287653a6d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# Build a package

parser_definition() {
    setup REST help:usage -- "usage: ${0##*/} [-dfSty] [--root ROOT] [pkg...]"
    msg -- '' 'Options:'
    flag CPT_DEBUG   -d --debug   export:1 init:@export -- "Keep the build directories after operation"
    flag CPT_TEST    -t --test    export:1 init:@export -- "Run tests (if they exist)"
    flag CPT_NOSTRIP -S --nostrip export:1 init:@export -- "Don't strip debug information from the binaries" \
                                                           "(might want to add '-g' to your '\$CFLAGS')"
    global_options
}

if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi

[ "$1" ] || { set -- "${PWD##*/}"; export CPT_PATH="${PWD%/*}:$CPT_PATH" ;}

create_cache

pkg_build "$@"