Commit Graph

13 Commits

Author SHA1 Message Date
Eli Schwartz 70f3b8ddb8
finddeps: suppress error messages for unreadable directories
If the find command cannot descend into a directory in order to search
for a PKGBUILD, it is likely a "$pkgdir" which makepkg sets as
unreadable. As far as finddeps is concerned, this error message is not
needed.

Also convert to using null-delimited paths on general principle to
prevent read from splitting on odd paths.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09 19:41:53 +02:00
Luke Shumaker a9dab95334
Add `# shellcheck` directives to quiet shellcheck, add PKGBUILD.proto
The added PKGBUILD.proto file is so that shellcheck can know know what
to expect that a PKGBUILD sets.
2017-07-05 18:21:56 +02:00
Luke Shumaker a396a69081
Make slightly more involved changes to make shellcheck happy.
- Use `read -r` instead of other forms of read or looping
 - Use arrays instead of strings with whitespaces.
 - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1)
2017-07-05 18:21:56 +02:00
Luke Shumaker 78fabcfa06
Quote strings that shellcheck warns about.
These changes are all strictly "slap some double-quotes in there".
Anything more than that is not included in this commit.
2017-07-05 18:21:56 +02:00
Luke Shumaker 3f72579b28
Make purely stylistic changes to make shellcheck happier.
These are purely stylistic changes that make shellcheck complain less.

This does NOT include things like quoting currently unquoted variables.
2017-07-05 18:21:55 +02:00
Luke Shumaker 14d5e1c21b
Add a "License:" tag to all code files.
In cases where there is no license specified, the file is tagged as
"License: Unspecified".  Obviously, that is not ideal, but it
highlights the fact, and I hope that it encourages whoever has the
authority to specify the license to do so.

On that note, to anyone who may have the authority to specify the
license of files in devtools: the current licence of many files is
GPLv2 with no option for later versions; I impore you to re-license
them to have the "or any later version" option.
2017-04-05 22:10:03 +02:00
Eric Bélanger 890baf6891 Make sure the usage functions are consistent
The usage messages now begins with a "Usage:", i.e. capitalized and with a colon. Fixes FS#26956.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15 15:25:07 +01:00
Pierre Schmitz aaa68e49e8 Move common functions to a shared file
* common.sh is included on build time
* most functions are copied from makepkg
2011-11-01 15:33:08 +01:00
Lukas Fleischer dcb80e7b5c finddeps: Unset optdepends
The optdepends array should be unset before sourcing the PKGBUILD to avoid
dangling optional depends.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:36 +02:00
Lukas Fleischer 84b789f760 finddeps: Use read builtin to iterate over packages
Using parameter substitution might result in unpredictable behaviour
when directories contain whitespaces here. The read shell builtin is the
proper way to read single lines.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:35 +02:00
Lukas Fleischer 8edb443c12 finddeps: Remove redundant cd(1)
Source the PKGBUILD using the correct path (relative to our base
directory) instead of using cd(1) to switch to the ABS base directory
first and to the package directory afterwards.

This is very useful when trying to track errors, also:

    $ ~/src/devtools/finddeps libdaq
    ./community/snort (depends)
    PKGBUILD: line 17: ruby: command not found
    PKGBUILD: line 19: [: =: unary operator expected

Versus:

    $ ~/src/devtools/finddeps libdaq
    ./community/snort (depends)
    ./community/ruby-pkgconfig/PKGBUILD: line 17: ruby: command not found
    ./community/lmms/PKGBUILD: line 19: [: =: unary operator expected

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:34 +02:00
Lukas Fleischer 4800be25c2 finddeps: Proper quoting, use double brackets
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 08:23:33 +02:00
Lukas Fleischer 46c4def073 Support non-standard install locations
This build system overhaul allows for adding (define-style) macros to
our scripts. All source files are now suffixed with ".in" to clarify
that they might contain unprocessed defines. The Makefile provides a new
rule to preprocess source files and generate proper output scripts.

Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it
instead of hardcoded paths to "/usr/share/devtools" everywhere. We
missed this when adding PREFIX support to the build system in commit
35fc83ce7d.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-07 21:53:02 +02:00