diff options
Diffstat (limited to 'sdf.build')
| -rwxr-xr-x | sdf.build | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sdf.build b/sdf.build new file mode 100755 index 0000000..068415a --- /dev/null +++ b/sdf.build @@ -0,0 +1,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 |
