aboutsummaryrefslogtreecommitdiffstats
path: root/Redofile
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-07-22 18:30:49 +0200
committerTharre <tharre3@gmail.com>2014-07-22 18:30:49 +0200
commitcabc74b6a557705043e248ebdbd969ebcc247311 (patch)
treedb8c0cbcd0186f31c67b3705e99a050d09e590dc /Redofile
parentaab81a6025e92c6ccab5810e1441fa7485a9159b (diff)
downloadredo-cabc74b6a557705043e248ebdbd969ebcc247311.tar.gz
redo-cabc74b6a557705043e248ebdbd969ebcc247311.tar.xz
redo-cabc74b6a557705043e248ebdbd969ebcc247311.zip
Cleanup Redofile and add support for custom install paths with DESTDIR
Diffstat (limited to 'Redofile')
-rw-r--r--Redofile13
1 files changed, 5 insertions, 8 deletions
diff --git a/Redofile b/Redofile
index c714912..a1bdd41 100644
--- a/Redofile
+++ b/Redofile
@@ -5,7 +5,7 @@ export SRCDIR=$ROOTDIR/src
export OUTDIR=$ROOTDIR/out
export VERSION="pre-0.01"
-# TODO: improve this
+DESTDIR=${DESTDIR-/usr/bin}
if [ "$1" = "all" ]; then
redo-ifchange $OUTDIR/redo $OUTDIR/redo-ifchange
@@ -15,11 +15,8 @@ elif [ "$1" = "clean" ]; then
rm -rf autom4te.cache config.h.in configure config.status config.log config.h
elif [ "$1" = "install" ]; then
redo-ifchange all
- sudo install $OUTDIR/redo /usr/bin
- sudo install $OUTDIR/redo-ifchange /usr/bin
-elif [ "$1" = "test" ]; then
- echo "Sadly there are no tests yet ..."
-elif [ "$1" = "zip" ]; then
- redo-ifchange clean # we always want to zip the clean workstate
- zip -r redo.zip *
+ mkdir -p $DESTDIR
+ install $OUTDIR/redo $DESTDIR
+ install $OUTDIR/redo-ifchange $DESTDIR
+ echo "Finished installing."
fi