#!/bin/bash
# This is a freeform script to install a profiler.
#

. /etc/autobench.conf || . functions

#
# Probably want to fetch a package of some sort first.
#
# You may want to specify a web location as well as sourcing the server repo:
# WEB_LOCATION="http://..."
# . $AUTODIR/var/server-repository
#
# Get it from the server repo first, if it's there
#wget -q -O $AUTODIR/sources/PROFILER_NAME-latest.tar.gz $SERVER_REPO/sources/PROFILER_NAME-latest.tar.gz
#if [ $? -ne 0 ]; then 
#  # Didn't find it on the repo, try the web location
#  echo "Fetching from the network"
#  wget -q -O $AUTODIR/sources/PROFILER_NAME-latest.tar.gz $WEB_LOCATION
#  if [ $? -ne 0 ]; then
#    # Couldn't get the source -- complain
#    echo "WARNING: could not download the source for sar"
#    exit 1
#  fi
#fi

#
# Next you probably want to uncompress the package, and then build it
#
#pushd $AUTODIR/sources > /dev/null
#rm -rf PROFILER_NAME 2> /dev/null
#DST_DIR=`tar ztf PROFILER_NAME-latest.tar.gz | head -n 1`
#tar zxf PROFILER_NAME-latest.tar.gz
#ln -sf $DST_DIR PROFILER_NAME 
#
# build it...
#pushd PROFILER_NAME > /dev/null
#./configure
#make
#if [ $? -ne 0 ]; then
#  echo "WARNING: unable to make PROFILER_NAME"
#fi
#popd > /dev/null
#popd > /dev/null
