mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-09 13:47:29 +00:00
abuild: add option -C DIR to allow change directory
Add option to change directory before executing commands.
This commit is contained in:
parent
857d4c5896
commit
74ac8ef3e6
@ -6,7 +6,7 @@ abuild(1)
|
||||
|
||||
# SYNOPSIS
|
||||
|
||||
*abuild* [options] [-P _REPODEST_] [-s _SRCDEST_] [-D _DESCRIPTION_] [cmd] ...
|
||||
*abuild* [options] [-C DIR] [-P _REPODEST_] [-s _SRCDEST_] [-D _DESCRIPTION_] [cmd] ...
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
@ -21,6 +21,9 @@ other related operations.
|
||||
*-c*
|
||||
Enable colored output
|
||||
|
||||
*-C DIR*
|
||||
Change directory to DIR before running any commands
|
||||
|
||||
*-d*
|
||||
Disable dependency checking
|
||||
|
||||
|
@ -2834,11 +2834,12 @@ snapshot() {
|
||||
|
||||
usage() {
|
||||
cat <<-EOF
|
||||
usage: $program [options] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION] [cmd] ...
|
||||
usage: $program [options] [-C DIR] [-P REPODEST] [-s SRCDEST] [-D DESC] [cmd] ...
|
||||
$program [-c] -n PKGNAME[-PKGVER]
|
||||
Options:
|
||||
-A Print CARCH and exit
|
||||
-c Enable colored output
|
||||
-C Change directory before running any commands
|
||||
-d Disable dependency checking
|
||||
-D Set APKINDEX description (default: \$repo \$(git describe))
|
||||
-f Force specified cmd (skip checks: apk up to date, arch)
|
||||
@ -2887,11 +2888,12 @@ usage() {
|
||||
|
||||
APKBUILD="${APKBUILD:-./APKBUILD}"
|
||||
unset color_opt force forceroot install_deps keep keep_build nodeps quiet verbose
|
||||
while getopts ":AcdD:fFhkKmnP:qrRs:uvV" opt; do
|
||||
while getopts ":AcC:dD:fFhkKmnP:qrRs:uvV" opt; do
|
||||
case $opt in
|
||||
'A') echo "$CARCH"; exit 0;;
|
||||
'c') enable_colors
|
||||
color_opt="-c";;
|
||||
'C') chdir "$OPTARG";;
|
||||
'd') nodeps="-d";;
|
||||
'D') DESCRIPTION=$OPTARG;;
|
||||
'f') force="-f";;
|
||||
|
Loading…
Reference in New Issue
Block a user