new_line -> newline
This commit is contained in:
parent
5b483999cc
commit
871e0b7de1
2 changed files with 6 additions and 6 deletions
|
@ -44,7 +44,7 @@ TEST=""
|
||||||
FORCE=""
|
FORCE=""
|
||||||
WARN=""
|
WARN=""
|
||||||
SORTARG=""
|
SORTARG=""
|
||||||
ENSURE_NEW_LINE=""
|
ENSURE_NEWLINE=""
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ while getopts "o:s:d:tnw:fl" options; do
|
||||||
w ) WARNMSG="$OPTARG";;
|
w ) WARNMSG="$OPTARG";;
|
||||||
f ) FORCE="true";;
|
f ) FORCE="true";;
|
||||||
t ) TEST="true";;
|
t ) TEST="true";;
|
||||||
l ) ENSURE_NEW_LINE="true";;
|
l ) ENSURE_NEWLINE="true";;
|
||||||
* ) echo "Specify output file with -o and fragments directory with -d"
|
* ) echo "Specify output file with -o and fragments directory with -d"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
|
@ -113,7 +113,7 @@ else
|
||||||
printf '%s\n' "$WARNMSG" > "fragments.concat"
|
printf '%s\n' "$WARNMSG" > "fragments.concat"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x${ENSURE_NEW_LINE} != x ]; then
|
if [ x${ENSURE_NEWLINE} != x ]; then
|
||||||
find fragments/ -type f -follow -print0 | xargs -0 -I '{}' sh -c 'if [ -n "$(tail -c 1 < {} )" ]; then echo >> {} ; fi'
|
find fragments/ -type f -follow -print0 | xargs -0 -I '{}' sh -c 'if [ -n "$(tail -c 1 < {} )" ]; then echo >> {} ; fi'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ define concat(
|
||||||
$replace = true,
|
$replace = true,
|
||||||
$gnu = undef,
|
$gnu = undef,
|
||||||
$order='alpha',
|
$order='alpha',
|
||||||
$ensure_new_line = false
|
$ensure_newline = false
|
||||||
) {
|
) {
|
||||||
include concat::setup
|
include concat::setup
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ define concat(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case $ensure_new_line {
|
case $ensure_newline {
|
||||||
'true', true, yes, on: {
|
'true', true, yes, on: {
|
||||||
$newlineflag = '-l'
|
$newlineflag = '-l'
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ define concat(
|
||||||
$newlineflag = ''
|
$newlineflag = ''
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Improper 'ensure_new_line' value given to concat: ${ensure_new_line}")
|
fail("Improper 'ensure_newline' value given to concat: ${ensure_newline}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue