Commit 948fedc5 authored by Jakub Jirutka's avatar Jakub Jirutka

indent heredocs when possible

parent e8508f7b
......@@ -88,18 +88,18 @@ do_keygen() {
}
usage() {
cat >&2 <<__EOF__
$program $program_version - generate signing keys
Usage: $program [-a|--append] [-i|--install] [-n]
Options:
-a, --append Set PACKAGER_PRIVKEY=<generated key> in
$ABUILD_USERCONF
-i, --install Install public key into /etc/apk/keys using sudo
-n Non-interactive. Use defaults
-q, --quiet
-h, --help Show this help
__EOF__
cat >&2 <<-__EOF__
$program $program_version - generate signing keys
Usage: $program [-a|--append] [-i|--install] [-n]
Options:
-a, --append Set PACKAGER_PRIVKEY=<generated key> in
$ABUILD_USERCONF
-i, --install Install public key into /etc/apk/keys using sudo
-n Non-interactive. Use defaults
-q, --quiet
-h, --help Show this help
__EOF__
}
append_config=
......
......@@ -43,19 +43,19 @@ do_sign() {
}
usage() {
cat >&2 <<__EOF__
$program $program_version - sign indexes
Usage: $program [-k PRIVKEY] [-p PUBKEY] INDEXFILE...
$program -e
Options:
-e, --installed Check only of there exist a private key 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
/etc/apk/keys/KEY
-q, --quiet
-h, --help Show this help
cat >&2 <<-__EOF__
$program $program_version - sign indexes
Usage: $program [-k PRIVKEY] [-p PUBKEY] INDEXFILE...
$program -e
Options:
-e, --installed Check only of there exist a private key 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
/etc/apk/keys/KEY
-q, --quiet
-h, --help Show this help
__EOF__
__EOF__
}
check_installed=false
......
......@@ -827,17 +827,17 @@ prepare_metafiles() {
echo "# using $($FAKEROOT -v)" >> "$pkginfo"
fi
echo "# $(date -u)" >> "$pkginfo"
cat >> "$pkginfo" <<EOF
pkgname = $name
pkgver = $pkgver-r$pkgrel
pkgdesc = $pkgdesc
url = $url
builddate = $builddate
packager = ${PACKAGER:-"Unknown"}
size = $size
arch = ${subpkgarch:-$pkgarch}
origin = $pkgname
EOF
cat >> "$pkginfo" <<-EOF
pkgname = $name
pkgver = $pkgver-r$pkgrel
pkgdesc = $pkgdesc
url = $url
builddate = $builddate
packager = ${PACKAGER:-"Unknown"}
size = $size
arch = ${subpkgarch:-$pkgarch}
origin = $pkgname
EOF
local i deps
deps="$depends"
if [ "$pkgname" != "busybox" ] && ! depends_has busybox; then
......@@ -2133,55 +2133,55 @@ snapshot() {
usage() {
echo "$program $program_version"
cat << EOF
usage: $program [options] [-P REPODEST] [-s SRCDEST] [cmd] ...
$program [-c] -n PKGNAME[-PKGVER]
Options:
-A Print CARCH and exit
-c Enable colored output
-d Disable dependency checking
-f Force specified cmd, even if they are already done
-F Force run as root
-h Show this help
-i Install PKG after successful build
-k Keep built packages, even if APKBUILD or sources are newer
-K Keep buildtime temp dirs and files (srcdir/pkgdir/deps)
-m Disable colors (monochrome)
-P Set REPODEST as the repository location for created packages
-q Quiet
-r Install missing dependencies from system repository (using sudo)
-R Recursively build and install missing dependencies (using sudo)
-s Set source package destination directory
-u Recursively build and upgrade all dependencies (using sudo)
Commands:
build Compile and install package into \$pkgdir
checksum Generate checksum to be included in APKBUILD
clean Remove temp build and install dirs
cleancache Remove downloaded files from \$SRCDEST
cleanoldpkg Remove binary packages except current version
cleanpkg Remove already built binary and source package
deps Install packages listed in makedepends and depends
fetch Fetch sources to \$SRCDEST and verify checksums
index Regenerate indexes in \$REPODEST
listpkg List target packages
package Create package in \$REPODEST
prepare Apply patches
rootpkg Run 'package', the split functions and create apks as fakeroot
sanitycheck Basic sanity check of APKBUILD
snapshot Create a \$giturl or \$svnurl snapshot and upload to \$disturl
sourcecheck Check if remote source package exists upstream
srcpkg Make a source package
undeps Uninstall packages listed in makedepends and depends
unpack Unpack sources to \$srcdir
up2date Compare target and sources dates
verify Verify checksums
To activate cross compilation specify in environment:
CHOST Arch or hostspec of machine to generate packages for
CTARGET Arch or hostspec of machine to generate compiler for
EOF
cat <<-EOF
usage: $program [options] [-P REPODEST] [-s SRCDEST] [cmd] ...
$program [-c] -n PKGNAME[-PKGVER]
Options:
-A Print CARCH and exit
-c Enable colored output
-d Disable dependency checking
-f Force specified cmd, even if they are already done
-F Force run as root
-h Show this help
-i Install PKG after successful build
-k Keep built packages, even if APKBUILD or sources are newer
-K Keep buildtime temp dirs and files (srcdir/pkgdir/deps)
-m Disable colors (monochrome)
-P Set REPODEST as the repository location for created packages
-q Quiet
-r Install missing dependencies from system repository (using sudo)
-R Recursively build and install missing dependencies (using sudo)
-s Set source package destination directory
-u Recursively build and upgrade all dependencies (using sudo)
Commands:
build Compile and install package into \$pkgdir
checksum Generate checksum to be included in APKBUILD
clean Remove temp build and install dirs
cleancache Remove downloaded files from \$SRCDEST
cleanoldpkg Remove binary packages except current version
cleanpkg Remove already built binary and source package
deps Install packages listed in makedepends and depends
fetch Fetch sources to \$SRCDEST and verify checksums
index Regenerate indexes in \$REPODEST
listpkg List target packages
package Create package in \$REPODEST
prepare Apply patches
rootpkg Run 'package', the split functions and create apks as fakeroot
sanitycheck Basic sanity check of APKBUILD
snapshot Create a \$giturl or \$svnurl snapshot and upload to \$disturl
sourcecheck Check if remote source package exists upstream
srcpkg Make a source package
undeps Uninstall packages listed in makedepends and depends
unpack Unpack sources to \$srcdir
up2date Compare target and sources dates
verify Verify checksums
To activate cross compilation specify in environment:
CHOST Arch or hostspec of machine to generate packages for
CTARGET Arch or hostspec of machine to generate compiler for
EOF
exit 0
}
......
......@@ -86,18 +86,18 @@ fixes #${fixes#\#}
}
usage() {
cat >&2 <<__EOF__
$program $program_version - bump pkgver in APKBUILDs
Usage: $program [-s CVE-1,CVE-2,...] [-f ISSUE] [-R|--recursive] [-k|--keep] PKGNAME-1.2.3 ...
Options:
-s, --security CVE1,CVE-2,... Security update
-f, --fixes ISSUE Fixes ISSUE
-R, --recursive Run abuild with -R for recursive building
-k, --keep Run abuild with -k to keep existing packages
-q, --quiet
-h, --help Show this help
__EOF__
cat >&2 <<-__EOF__
$program $program_version - bump pkgver in APKBUILDs
Usage: $program [-s CVE-1,CVE-2,...] [-f ISSUE] [-R|--recursive] [-k|--keep] PKGNAME-1.2.3 ...
Options:
-s, --security CVE1,CVE-2,... Security update
-f, --fixes ISSUE Fixes ISSUE
-R, --recursive Run abuild with -R for recursive building
-k, --keep Run abuild with -k to keep existing packages
-q, --quiet
-h, --help Show this help
__EOF__
}
keep=
......
......@@ -73,21 +73,21 @@ do_nothing() {
}
usage() {
cat >&2 <<__EOF__
$program $program_version - display or bump pkgrel in APKBUILDs
Usage: $program [-z|--zero] [-a|--add] [-g|--clean-git] [-s|--set NUM]
[-t|--test] [-f|--force] DIR or APKBUILD...
Options:
-z, --zero Set pkgrel to 0
-a, --add Add 1 to current pkgrel
-g, --clean-git Only operate on APKBUILDs with clean git status (implies
--add)
-s, --set NUM Set pkgrel to NUM
-t, --test Only verify that files have a valid pkgrel
-f, --force Operate on files without a valid pkgrel
-h, --help Show this help
__EOF__
cat >&2 <<-__EOF__
$program $program_version - display or bump pkgrel in APKBUILDs
Usage: $program [-z|--zero] [-a|--add] [-g|--clean-git] [-s|--set NUM]
[-t|--test] [-f|--force] DIR or APKBUILD...
Options:
-z, --zero Set pkgrel to 0
-a, --add Add 1 to current pkgrel
-g, --clean-git Only operate on APKBUILDs with clean git status (implies
--add)
-s, --set NUM Set pkgrel to NUM
-t, --test Only verify that files have a valid pkgrel
-f, --force Operate on files without a valid pkgrel
-h, --help Show this help
__EOF__
}
cmd=do_show
......
......@@ -17,13 +17,13 @@ fi
usage() {
cat >&2 <<__EOF__
$program $program_version - find ABI breakages in package upgrades
Usage: $program
cat >&2 <<-__EOF__
$program $program_version - find ABI breakages in package upgrades
Usage: $program
Run in the directory of a built package.
Run in the directory of a built package.
__EOF__
__EOF__
}
if [ $# -gt 0 ]; then
......
......@@ -286,25 +286,25 @@ __EOF__
}
usage() {
cat >&2 <<__EOF__
$program $program_version - generate a new APKBUILD
Usage: $program [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL]
PKGNAME[-PKGVER]|SRCURL
Options:
-n Set package name to NAME
-d Set package description (pkgdesc) to DESC
-l Set package license to LICENSE
-u Set package URL
-a Create autotools (use ./configure ...)
-C Create CMake pakckage (Assume cmake/ is there)
-p Create perl package (Assume Makefile.PL is there)
-y Create python package (Assume setup.py is there)
-s Use sourceforge source URL
-c Copy a sample init.d, conf.d, and install script to new directory
-f Force even if directory already exist
-h Show this help
__EOF__
cat >&2 <<-__EOF__
$program $program_version - generate a new APKBUILD
Usage: $program [-cfh] [-d DESC] [-l LICENSE] [-n NAME] [-u URL]
PKGNAME[-PKGVER]|SRCURL
Options:
-n Set package name to NAME
-d Set package description (pkgdesc) to DESC
-l Set package license to LICENSE
-u Set package URL
-a Create autotools (use ./configure ...)
-C Create CMake pakckage (Assume cmake/ is there)
-p Create perl package (Assume Makefile.PL is there)
-y Create python package (Assume setup.py is there)
-s Use sourceforge source URL
-c Copy a sample init.d, conf.d, and install script to new directory
-f Force even if directory already exist
-h Show this help
__EOF__
}
while getopts "acd:fhl:n:pyu:s" opt; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment