]> git.saurik.com Git - apt.git/blame_incremental - CMake/run_if_exists.sh
Release 1.3.1
[apt.git] / CMake / run_if_exists.sh
... / ...
CommitLineData
1#!/bin/sh
2# Small helper for running a command
3out=""
4if [ "$1" = "--stdout" ]; then
5 out="$2"
6 shift 2
7fi
8
9if [ -e "$1" ]; then
10 shift
11 if [ "$out" ]; then
12 exec "$@" > $out
13 else
14 exec "$@"
15 fi
16fi