Imported from ../bash-1.14.7.tar.gz.
[platform/upstream/bash.git] / builtins / psize.sh
1 #! /bin/sh
2 #
3 # psize.sh -- determine this system's pipe size, and write a define to
4 #             pipesize.h so ulimit.c can use it.
5
6 echo "/*"
7 echo " * pipesize.h"
8 echo " *"
9 echo " * This file is automatically generated by psize.sh"
10 echo " * Do not edit!"
11 echo " */"
12 echo ""
13
14 ./psize.aux 2>/tmp/pipesize | sleep 3
15
16 if [ -s /tmp/pipesize ]; then
17         echo "#define PIPESIZE `cat /tmp/pipesize`"
18 else
19         echo "#define PIPESIZE 512"
20 fi
21
22 rm -f /tmp/pipesize
23
24 exit 0