From cabc74b6a557705043e248ebdbd969ebcc247311 Mon Sep 17 00:00:00 2001 From: Tharre Date: Tue, 22 Jul 2014 18:30:49 +0200 Subject: Cleanup Redofile and add support for custom install paths with DESTDIR --- Redofile | 13 +++++-------- 1 file 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 -- cgit v1.2.3-70-g09d2