#!/bin/bash
umask 022
case `hostname` in
  *r7n1*|piccolo) installdir=/sara/sw/disparm-1.1
    ;;
  *) installdir=$HOME/myroot/sara/sw/disparm-1.1
    ;;
esac
mkdir -p $installdir/{bin,man/man1}
chmod 755 $installdir
chmod 755 $installdir/{bin,man,man/man1}
make || exit
echo installing in $installdir :
cp disparmcmd sara-get-mem-size sara-get-num-cores $installdir/bin || exit
cp disparm.1 disparmcmd.1 sara-get-mem-size.1 sara-get-num-cores.1 $installdir/man/man1 || exit
chmod 755 $installdir/bin/* || exit
chmod 644 $installdir/man/man1/* || exit
echo done
