summaryrefslogtreecommitdiff
path: root/src/chroot-tools/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/libremakepkg')
-rwxr-xr-xsrc/chroot-tools/libremakepkg62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index c4a2cc8..a1d30d4 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -1,7 +1,7 @@
#!/bin/bash -euE
# libremakepkg
-# Copyright 2010 - 2011 Nicolás Reynolds
+# Copyright 2010-2011 Nicolás Reynolds
# Copyright 2011 Joshua Ismael Haase Hernández
# Copyright 2012-2013 Luke Shumaker
#
@@ -267,37 +267,35 @@ check_pkg() {
# The main program #############################################################
-cmd=${0##*/}
usage() {
- echo "Usage: $cmd [options] [-- makepkg args]"
- echo 'This program will build your package.'
- echo ''
- echo 'If run from outside of a chroot, command will make the following'
- echo 'configuration changes in the chroot:'
- echo ' - whatever changes `librechroot` makes.'
- echo ' - set `PKGDEST` and `SRCDEST` in `/etc/makepkg.conf`'
- echo ' - set `PACKAGER` in `/etc/makepkg.conf` to reflect the value'
- echo ' outside of the chroot.'
- echo ' - (maybe) delete `/build/.makepkg.conf`'
- echo ' - (maybe) delete `/build/.ssh/config`'
- echo 'If run from inside of a chroot, this command will:'
- echo ' - (maybe) delete `~/.makepkg.conf`'
- echo ' - (maybe) delete `~/.ssh/config`'
- echo "The above 'maybe's happen as part of the workarounds to make"
- echo 'distcc work in a network-less environment. They will happen if'
- echo 'both `socat` and `distcc` are installed in the chroot.'
- echo ''
- echo "The \`-n' and \`-l' options behave identically to librechroot,"
- echo 'see the documentation there.'
- echo ''
- echo 'Options:'
- echo ' -n <CHROOT> Name of the chroot to use'
- echo ' -l <COPY> Name of, or absolute path to, the copy to use'
- echo " -N Don't disable networking during build() or package()"
- echo " PLEASE don't use this unless you have a special"
- echo " reason, its use is a violation of Parabola policy."
- echo ' -R Repackage contents of the package without rebuilding'
- echo ' -h Show this message'
+ print "Usage: %s [options] [-- makepkg args]" "${0##*/}"
+ print 'This program will build your package.'
+ echo
+ prose 'If run from outside of a chroot, command will make the following
+ configuration changes in the chroot:'
+ bullet 'whatever changes `librechroot` makes.'
+ bullet 'set `PKGDEST` and `SRCDEST` in `/etc/makepkg.conf`'
+ bullet 'set `PACKAGER` in `/etc/makepkg.conf` to reflect the value
+ outside of the chroot.'
+ bullet '(maybe) delete `/build/.makepkg.conf`'
+ bullet '(maybe) delete `/build/.ssh/config`'
+ prose 'If run from inside of a chroot, this command will:'
+ bullet '(maybe) delete `~/.makepkg.conf`'
+ bullet '(maybe) delete `~/.ssh/config`'
+ prose 'The above "maybe"s happen as part of the workarounds to make
+ distcc work in a network-less environment. They will happen if
+ both `socat` and `distcc` are installed in the chroot.'
+ echo
+ prose 'The `-n` and `-l` options behave identically to librechroot, see
+ the documentation there.'
+ echo
+ print 'Options:'
+ flag "-n <$(_ CHROOT)>" 'Name of the chroot to use'
+ flag "-l <$(_ COPY)>" 'Name of, or absolute path to, the copy to use'
+ flag '-N' \
+ "Don't disable networking during build() and package(). PLEASE don't use this unless you have a special reason, its use is a violation of Parabola policy."
+ flag '-R' 'Repackage contents of the package without rebuilding'
+ flag '-h' 'Show this message'
}
# Globals: $CHROOTDIR, $CHROOT, $COPY and $copydir
@@ -366,7 +364,7 @@ main() {
# OK, we're starting now ###############################################
$INCHROOT || lock_open_write 9 "$copydir" \
- "Waiting for existing lock on chroot copy to be released: [$COPY]"
+ "Waiting for existing lock on chroot copy to be released: [%s]" "$COPY"
# Set target CARCH as it might be used within the PKGBUILD to select
# correct sources