Commit graph

27 commits

Author SHA1 Message Date
Ashley Penney
a2df44a967 Fix newlines.
Previously the newline handling modified the actual fragments, causing
multiple runs to always update the newlines.  Handle this appropriately.
2014-04-21 18:36:59 -04:00
Alexander Kuznetsov
c51b6598e3 Proper quoting of quotes. 2014-04-04 09:35:06 -04:00
Alexander Kuznetsov
00a8f4e736 [Most of] variables quoted to allow multi-word warning messages, spaces in file/directory names, etc. 2013-12-17 11:03:38 -05:00
Joshua Hoblitt
c73b019226 remove dead files 2013-11-01 18:32:02 -07:00
Luis Fernandez Alvarez
99384037d6 Removed duplicated opts.separator call in concatfragments.rb 2013-10-28 09:03:30 +01:00
Luis Fernandez Alvarez
b09be245d4 Add Windows support
- It adds a ruby version of the bash script.
- Refactor setup.pp to include new variables.
- Generalizes command execution according to variables in setup.pp.
2013-10-25 14:47:03 +02:00
Paul Chechetin
ac9bb8d853 Replace LANG => LC_ALL 2013-10-25 01:16:05 +04:00
Ashley Penney
7313d26007 Merge pull request #61 from hubspotdevops/newline_upstream
add ensure_newline
2013-08-09 08:44:18 -07:00
plantigrade
3728ba33d4 Update concatfragments.sh ... fix broken behavior introduced in 3d60c9ef61 2013-08-09 15:08:56 +02:00
Tom McLaughlin
871e0b7de1 new_line -> newline 2013-08-08 16:25:32 -04:00
Tom McLaughlin
5b483999cc Add -l to getopts 2013-08-08 16:25:32 -04:00
Tom McLaughlin
3defb6e1c1 Ability to control if fragments should always have a newline at the end. 2013-08-08 16:25:32 -04:00
Ashley Penney
0046fe45f8 Merge pull request #56 from nibalizer/for-loop
Refactor loop to use for-do instead of while-read.
2013-08-08 12:21:29 -07:00
Spencer Krum
3d60c9ef61 Refactor loop to use for-do instead of while-read.
This for loop around find removes the need for the read statement.
The read statement isn't portable to solaris, because Read has no -r option
in /bin/sh on solaris. This should resolve Issue #45.
2013-08-08 10:52:59 -07:00
Ashley Penney
82de49bcd0 Merge pull request #46 from andir/warnmsg_fix
Allow WARNMSG to contain/start with '#'
2013-08-07 16:08:56 -07:00
mh
78e547025b sort always with LANG=C
somehowe puppet leaks then LANG into execs, which can give different
ordering depending with which LANG puppet is executed. Which is likely
different between a logged in admin and cron
2013-05-22 00:03:56 +02:00
Andreas Rammhold
f1579e50ca Allow WARNMSG to contain/start with '#'
Previosuly this error was being displayed:
	108: [: x#: unexpected operator
2013-04-28 13:59:40 +02:00
Andy Bohne
03650cc0ca Added -r flag to read so that filenames with \ will be read correctly 2013-04-08 10:42:53 -04:00
Reid Vandewiele
81d5ee80f3 Remove the gnu parameter from concat
Previously, the concatfragments.sh script was would default to using
GNU-specific flags for find, sort, and xargs. This necessitated
explicit passing of a "gnu = false" parameter to the concat define in
order to successfully run the script without GNU-specific flags when
working with systems that do not by default include GNU versions of the
utilities (solaris, for example).

This commit modifies the concatfragments script such that GNU versions
of the utilities are not needed at all. It does this while preserving
the original use case for the GNU flags, which was to allow special
characters (like spaces) in the filenames, which it accomplished by
using GNU flags to separate fields using null characters instead of
newlines.

In order to preserve backwards-compatibility with existing puppet
installations that make use of the "gnu = false" parameter, the
parameter list for the concat define has not been changed. Rather, the
gnu parameter is now deprecated and ignored.
2012-04-17 12:02:38 -07:00
Sharif Nassar
9dac53afc8 Remove silly environment variable that corrupts reality.
Not sure how this is set in our puppet environment, but it is.
http://nexenta.org/projects/site/wiki/Personalities
2011-12-13 20:24:10 -08:00
Sharif Nassar
4dff5634b3 On Solaris, 'test -a' does not work with /bin/sh
-a file                 True if file exists. (Not  available
                             in sh.)
2011-07-11 16:54:20 -07:00
Tim
0c5dcc82c4 Dash (default /bin/sh on Debian and Ubuntu) does not support 'echo -e'. That invocation of echo is not POSIX compliant: https://bugs.launchpad.net/ubuntu/+source/dash/+bug/72167 2011-04-20 14:54:27 -07:00
Pierre-Yves Ritschard
031bf26128 - make the root group configurable in the concat::setup class for portability
- use sh and not bash
2011-02-03 18:01:36 +00:00
Jonathan Boyett
03ac60902b add "g" option to getopts 2010-12-14 11:06:27 -08:00
Jonathan Boyett
fa80fc2b31 add a -g flag to concatfragments.sh to disable GNU extensions to find, sort and xargs; makes concat work on Solaris.
Add a $gnu parameter to make use of the aforementioned -g flag, and a $order parameter to make use of the -n flag in concatfragments.sh
2010-12-03 12:35:23 -08:00
martin f. krafft
af63a0b3eb Parametrize warning message
The concat warn parameter can now be any string (and needs to include
the appropriate commenting character) and will then override the default
(which still gets printed when warn=>true).

Signed-off-by: martin f. krafft <madduck@madduck.net>
2010-10-04 22:46:18 +01:00
R.I.Pienaar
ee1fe7a023 Pull in work from private Subversion repository 2010-05-06 22:55:02 +01:00