From 0b9c238684e41b75782e74655e60adfb4391dacf Mon Sep 17 00:00:00 2001 From: delphinus Date: Mon, 18 May 2015 10:49:36 +0900 Subject: [PATCH] update install.sh * install man's * install grc.bashrc to profile dir * use $PREFIX to determine install prefix --- install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 9b22c49..b1f656d 100755 --- a/install.sh +++ b/install.sh @@ -2,15 +2,22 @@ set -e -DESTDIR=$1 -BINDIR=$DESTDIR/usr/bin -LIBDIR=$DESTDIR/usr/share/grc -MANDIR=$DESTDIR/usr/share/man/man1 -CONFDIR=$DESTDIR/etc +PREFIX=$1 +if [ -z $PREFIX ]; then + PREFIX=/usr/local +fi + +BINDIR=$PREFIX/bin +LIBDIR=$PREFIX/share/grc +MANDIR=$PREFIX/share/man +CONFDIR=/etc +PROFILEDIR=$CONFDIR/profile.d mkdir -p $BINDIR || true cp -fv grc grcat $BINDIR mkdir -p $LIBDIR || true cp -fv conf.* $LIBDIR -mkdir -p $CONFDIR || true +cp -fv $MANDIR/man1/grc.1 $MANDIR +cp -fv $MANDIR/man1/grcat.1 $MANDIR cp -fv grc.conf $CONFDIR +cp -fv grc.bashrc $PROFILEDIR