Commit Graph

9 Commits

Author SHA1 Message Date
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 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
Timothy Redaelli 594f972666 Use #!/bin/bash instead of #!/bin/sh
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-20 23:05:38 +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 a0c6bf4556 Honor TMPDIR environment variable
Replace all mktemp(1) invocations that hardcode "/tmp" with `mktemp
--tmpdir` and change templates accordingly.

Note that "--tmpdir" is GNU-ish which is okay given that we currently
support Arch Linux only anyway.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-13 11:10:09 +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