Skip to content

Commit 35d855e

Browse files
authored
Merge pull request #5717 from btriller/minor-changes
Fix some minor issues
2 parents 16a24b2 + f544508 commit 35d855e

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ then
318318
# pg_config is only for native builds
319319
if test "x$cross_compiling" = "xno"
320320
then
321-
if test x`which $PG_CONFIG` != x
321+
if test x`command -v $PG_CONFIG` != x
322322
then
323323
pg_include_dir=`$PG_CONFIG --includedir`
324324
if test -n "$pg_include_dir"
@@ -364,7 +364,7 @@ then
364364
# mysql_config is only for native builds
365365
if test "x$cross_compiling" = "xno"
366366
then
367-
if test x`which $MYSQL_CONFIG` != x
367+
if test x`command -v $MYSQL_CONFIG` != x
368368
then
369369
mysql_include_dir=`$MYSQL_CONFIG --include`
370370
if test -n "$mysql_include_dir"
@@ -1674,7 +1674,7 @@ dnl #####################################################################
16741674
AC_PATH_PROG(HOSTNAME, hostname, "", $PATH)
16751675

16761676
AC_DEFINE_UNQUOTED(AUTOCONF_HOSTNAME, "`$HOSTNAME`", [Special CFEngine symbol])
1677-
AC_DEFINE_UNQUOTED(AUTOCONF_SYSNAME, "$target_os", [Speial CFEngine symbol])
1677+
AC_DEFINE_UNQUOTED(AUTOCONF_SYSNAME, "$target_os", [Special CFEngine symbol])
16781678

16791679

16801680
dnl #####################################################################

examples/groupexists.cf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#+begin_src cfengine3
2424
body common control
25-
2625
{
2726
bundlesequence => { "example" };
2827
}

m4/cf3_platforms.m4

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
# Good example: use LINUX to select code which uses inotify and netlink sockets.
3030
# Bad example: use LINUX to select code which parses output of coreutils' ps(1).
3131
#
32-
AM_CONDITIONAL([LINUX], [test -n "`echo ${target_os} | grep linux`"])
33-
AM_CONDITIONAL([MACOSX], [test -n "`echo ${target_os} | grep darwin`"])
34-
AM_CONDITIONAL([SOLARIS], [test -n "`(echo ${target_os} | egrep 'solaris|sunos')`"])
35-
AM_CONDITIONAL([NT], [test -n "`(echo ${target_os} | egrep 'mingw|cygwin')`"])
36-
AM_CONDITIONAL([CYGWIN], [test -n "`(echo ${target_os} | egrep 'cygwin')`"])
37-
AM_CONDITIONAL([AIX], [test -n "`(echo ${target_os} | grep aix)`"])
38-
AM_CONDITIONAL([HPUX], [test -n "`(echo ${target_os} | egrep 'hpux|hp-ux')`"])
39-
AM_CONDITIONAL([FREEBSD], [test -n "`(echo ${target_os} | grep freebsd)`"])
40-
AM_CONDITIONAL([NETBSD], [test -n "`(echo ${target_os} | grep netbsd)`"])
41-
AM_CONDITIONAL([XNU], [test -n "`(echo ${target_os} | grep darwin)`"])
32+
AM_CONDITIONAL([LINUX], [echo ${target_os} | grep -q linux])
33+
AM_CONDITIONAL([MACOSX], [echo ${target_os} | grep -q darwin])
34+
AM_CONDITIONAL([SOLARIS], [echo ${target_os} | grep -qE 'solaris|sunos'])
35+
AM_CONDITIONAL([NT], [echo ${target_os} | grep -qE 'mingw|cygwin'])
36+
AM_CONDITIONAL([CYGWIN], [echo ${target_os} | grep -qE 'cygwin'])
37+
AM_CONDITIONAL([AIX], [echo ${target_os} | grep -q aix])
38+
AM_CONDITIONAL([HPUX], [echo ${target_os} | grep -qE 'hpux|hp-ux'])
39+
AM_CONDITIONAL([FREEBSD], [echo ${target_os} | grep -q freebsd])
40+
AM_CONDITIONAL([NETBSD], [echo ${target_os} | grep -q netbsd])
41+
AM_CONDITIONAL([XNU], [echo ${target_os} | grep -q darwin])

tests/acceptance/testall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ if [ $? -ne 0 ]
167167
then
168168
HAVE_DATE_PCT_S=1
169169
fi
170-
PERL=`which perl 2>/dev/null`
170+
PERL=`command -v perl 2>/dev/null`
171171

172172
# color!
173173
if [ "${CFENGINE_COLOR}" = "1" ]

0 commit comments

Comments
 (0)