indent heredocs when possible

This commit is contained in:
Jakub Jirutka 2016-08-20 15:16:48 +02:00
parent e8508f7b18
commit 948fedc5f7
7 changed files with 128 additions and 128 deletions

View File

@ -88,10 +88,10 @@ do_keygen() {
} }
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - generate signing keys $program $program_version - generate signing keys
Usage: $program [-a|--append] [-i|--install] [-n] Usage: $program [-a|--append] [-i|--install] [-n]
Options: Options:
-a, --append Set PACKAGER_PRIVKEY=<generated key> in -a, --append Set PACKAGER_PRIVKEY=<generated key> in
$ABUILD_USERCONF $ABUILD_USERCONF
-i, --install Install public key into /etc/apk/keys using sudo -i, --install Install public key into /etc/apk/keys using sudo
@ -99,7 +99,7 @@ Options:
-q, --quiet -q, --quiet
-h, --help Show this help -h, --help Show this help
__EOF__ __EOF__
} }
append_config= append_config=

View File

@ -43,11 +43,11 @@ do_sign() {
} }
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - sign indexes $program $program_version - sign indexes
Usage: $program [-k PRIVKEY] [-p PUBKEY] INDEXFILE... Usage: $program [-k PRIVKEY] [-p PUBKEY] INDEXFILE...
$program -e $program -e
Options: Options:
-e, --installed Check only of there exist a private key for signing -e, --installed Check only of there exist a private key for signing
-k, --private KEY The private key to use for signing -k, --private KEY The private key to use for signing
-p, --public KEY The name of public key. apk add will look for -p, --public KEY The name of public key. apk add will look for
@ -55,7 +55,7 @@ Options:
-q, --quiet -q, --quiet
-h, --help Show this help -h, --help Show this help
__EOF__ __EOF__
} }
check_installed=false check_installed=false

View File

@ -827,17 +827,17 @@ prepare_metafiles() {
echo "# using $($FAKEROOT -v)" >> "$pkginfo" echo "# using $($FAKEROOT -v)" >> "$pkginfo"
fi fi
echo "# $(date -u)" >> "$pkginfo" echo "# $(date -u)" >> "$pkginfo"
cat >> "$pkginfo" <<EOF cat >> "$pkginfo" <<-EOF
pkgname = $name pkgname = $name
pkgver = $pkgver-r$pkgrel pkgver = $pkgver-r$pkgrel
pkgdesc = $pkgdesc pkgdesc = $pkgdesc
url = $url url = $url
builddate = $builddate builddate = $builddate
packager = ${PACKAGER:-"Unknown"} packager = ${PACKAGER:-"Unknown"}
size = $size size = $size
arch = ${subpkgarch:-$pkgarch} arch = ${subpkgarch:-$pkgarch}
origin = $pkgname origin = $pkgname
EOF EOF
local i deps local i deps
deps="$depends" deps="$depends"
if [ "$pkgname" != "busybox" ] && ! depends_has busybox; then if [ "$pkgname" != "busybox" ] && ! depends_has busybox; then
@ -2133,10 +2133,10 @@ snapshot() {
usage() { usage() {
echo "$program $program_version" echo "$program $program_version"
cat << EOF cat <<-EOF
usage: $program [options] [-P REPODEST] [-s SRCDEST] [cmd] ... usage: $program [options] [-P REPODEST] [-s SRCDEST] [cmd] ...
$program [-c] -n PKGNAME[-PKGVER] $program [-c] -n PKGNAME[-PKGVER]
Options: Options:
-A Print CARCH and exit -A Print CARCH and exit
-c Enable colored output -c Enable colored output
-d Disable dependency checking -d Disable dependency checking
@ -2154,7 +2154,7 @@ Options:
-s Set source package destination directory -s Set source package destination directory
-u Recursively build and upgrade all dependencies (using sudo) -u Recursively build and upgrade all dependencies (using sudo)
Commands: Commands:
build Compile and install package into \$pkgdir build Compile and install package into \$pkgdir
checksum Generate checksum to be included in APKBUILD checksum Generate checksum to be included in APKBUILD
clean Remove temp build and install dirs clean Remove temp build and install dirs
@ -2177,11 +2177,11 @@ Commands:
up2date Compare target and sources dates up2date Compare target and sources dates
verify Verify checksums verify Verify checksums
To activate cross compilation specify in environment: To activate cross compilation specify in environment:
CHOST Arch or hostspec of machine to generate packages for CHOST Arch or hostspec of machine to generate packages for
CTARGET Arch or hostspec of machine to generate compiler for CTARGET Arch or hostspec of machine to generate compiler for
EOF EOF
exit 0 exit 0
} }

View File

@ -86,10 +86,10 @@ fixes #${fixes#\#}
} }
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - bump pkgver in APKBUILDs $program $program_version - bump pkgver in APKBUILDs
Usage: $program [-s CVE-1,CVE-2,...] [-f ISSUE] [-R|--recursive] [-k|--keep] PKGNAME-1.2.3 ... Usage: $program [-s CVE-1,CVE-2,...] [-f ISSUE] [-R|--recursive] [-k|--keep] PKGNAME-1.2.3 ...
Options: Options:
-s, --security CVE1,CVE-2,... Security update -s, --security CVE1,CVE-2,... Security update
-f, --fixes ISSUE Fixes ISSUE -f, --fixes ISSUE Fixes ISSUE
-R, --recursive Run abuild with -R for recursive building -R, --recursive Run abuild with -R for recursive building
@ -97,7 +97,7 @@ Options:
-q, --quiet -q, --quiet
-h, --help Show this help -h, --help Show this help
__EOF__ __EOF__
} }
keep= keep=

View File

@ -73,11 +73,11 @@ do_nothing() {
} }
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - display or bump pkgrel in APKBUILDs $program $program_version - display or bump pkgrel in APKBUILDs
Usage: $program [-z|--zero] [-a|--add] [-g|--clean-git] [-s|--set NUM] Usage: $program [-z|--zero] [-a|--add] [-g|--clean-git] [-s|--set NUM]
[-t|--test] [-f|--force] DIR or APKBUILD... [-t|--test] [-f|--force] DIR or APKBUILD...
Options: Options:
-z, --zero Set pkgrel to 0 -z, --zero Set pkgrel to 0
-a, --add Add 1 to current pkgrel -a, --add Add 1 to current pkgrel
-g, --clean-git Only operate on APKBUILDs with clean git status (implies -g, --clean-git Only operate on APKBUILDs with clean git status (implies
@ -87,7 +87,7 @@ Options:
-f, --force Operate on files without a valid pkgrel -f, --force Operate on files without a valid pkgrel
-h, --help Show this help -h, --help Show this help
__EOF__ __EOF__
} }
cmd=do_show cmd=do_show

View File

@ -17,13 +17,13 @@ fi
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - find ABI breakages in package upgrades $program $program_version - find ABI breakages in package upgrades
Usage: $program Usage: $program
Run in the directory of a built package. Run in the directory of a built package.
__EOF__ __EOF__
} }
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then

View File

@ -286,11 +286,11 @@ __EOF__
} }
usage() { usage() {
cat >&2 <<__EOF__ cat >&2 <<-__EOF__
$program $program_version - generate a new APKBUILD $program $program_version - generate a new APKBUILD
Usage: $program [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL] Usage: $program [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL]
PKGNAME[-PKGVER]|SRCURL PKGNAME[-PKGVER]|SRCURL
Options: Options:
-n Set package name to NAME -n Set package name to NAME
-d Set package description (pkgdesc) to DESC -d Set package description (pkgdesc) to DESC
-l Set package license to LICENSE -l Set package license to LICENSE
@ -304,7 +304,7 @@ Options:
-f Force even if directory already exist -f Force even if directory already exist
-h Show this help -h Show this help
__EOF__ __EOF__
} }
while getopts "acd:fhl:n:pyu:s" opt; do while getopts "acd:fhl:n:pyu:s" opt; do