Commit Graph

15 Commits

Author SHA1 Message Date
Eli Schwartz 8f5a02b23d
Don't rely on $0 to determine script names.
Programs can freely define the value of argv0 and thus it means nothing.
Instead, use the bash-specific variable explicitly designed to safely
and accurately reference the name of the currently sourced file.

This also fixes the case where simple debugging mechanisms like using
"bash -x foo" tried to treat "foo" as the unqualified $0 and therefore
broke horribly due to lack of pathnames.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09 19:41:51 +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 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
lukeshu@parabola.nu 6098253f6f
Handle makepkg.conf more consistently 2017-04-05 22:17:51 +02:00
Luke Shumaker cb35d74f8c
Avoid using string interpolation; use printf format strings instead.
This involves extending the signature of lib/common.sh's `stat_busy()`,
`lock()`, and `slock()`. The `mesg=$1; shift` in stat_busy even suggests
that this is what was originally intended from it.
2017-04-05 22:11:16 +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
Sven-Hendrik Haase 7fc22b9aba Use repos.archlinux.org everywhere instead of hostname based domains
This makes it a lot easier to swap out the host that actually serves the repos in the future.
2016-05-27 21:02:46 +02:00
Pierre Schmitz 9cef7e0a9e Use nymeria instead of gerolde 2013-01-20 18:24:04 +01: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 21458bd07b For now only packages and svn from sigurd will be moved to nymeria 2012-11-11 21:07:34 +01:00
Pierre Schmitz fdeaed894a Use nymeria.archlinux.org as shared host for developers and trusted users 2012-11-03 17:32:33 +01:00
Lukas Fleischer 56d4dec19f Use double brackets everywhere
We already fixed a couple of these in previous patches - this one should
replace all remaining uses of single brackets ("[") by double brackets.
Also, use arithmetic evaluation instead of conditional expressions where
appropriate and make use of "-z" and "-n" instead of comparing variables
to empty strings.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-12-04 18:00:57 +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 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