summaryrefslogtreecommitdiff
path: root/sdf.build
blob: 068415ac47660015f74954a46bd86de92e2befea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

name=$(basename $0)

if [ -z "$1" ] ; then
    echo $name: usage $name dir
    exit 1
fi

if [ "$(echo $1 | grep / | grep -v grep)" ] ; then
    echo $name: use the script from the parent directory of the thing to build
    exit 1;
fi

build=/tmp/$$.build

cp -r $1 $build

cd $build
make
cd -
cp $build/$1 $1

rm -rf $build