source: to-imperative/trunk/config.functions @ 10

Last change on this file since 10 was 10, checked in by pooh, 21 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 553 bytes
Line 
1#!/bin/sh
2
3config_functions=1
4
5if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
6  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
7    ac_n= ac_c='
8' ac_t='        '
9  else
10    ac_n=-n ac_c= ac_t=
11  fi
12else
13  ac_n= ac_c='\c' ac_t=
14fi
15
16echon ()
17{
18  echo $ac_n "$*"$ac_c
19}
20
21merge_lists ()
22{
23  echo $1
24  res="$1"
25  for arg1 in $2; do
26    match=no
27    for arg2 in $1; do
28      if [ "$arg1" = "$arg2" ]; then
29        match=yes
30      fi
31    done
32    if [ "$match" = "no" ]; then res="$res $arg1"; fi
33  done
34  echo $res
35}
36
Note: See TracBrowser for help on using the repository browser.