File: __boolstr

package info (click to toggle)
mongo-c-driver 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,532 kB
  • sloc: ansic: 197,016; python: 7,890; cpp: 2,343; sh: 693; makefile: 77
file content (15 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env sh

# Execute the given argument list as a command. If exits zero, prints "true",
# otherwise "false". stdout from the subcommand will be supressed. stderr will
# be forwarded. This script itself will always exit zero.

# Usage: __boolstr [cmd...]

"$@" 1>/dev/null

if test $? = 0; then
    printf "true"
else
    printf "false"
fi