#!/bin/bash

SCRIPT=/usr/local/bin
LISP=/usr/share/emacs21/site-lisp

echo  "This will install search-ccsb in your computer"
echo -n "Script location (this should be in your PATH) [$SCRIPT]:"
read tmp

if [ "$tmp" != "" ];then
    SCRIPT=$tmp
fi

echo -n "Lisp location [$LISP]:"
read tmp

if [ "$tmp" != "" ]; then
    LISP=$tmp
fi


cp search-ccsb $SCRIPT && echo "Arquivo copiado em $SCRIPT" || exit 1
cp search-ccsb.{el,elc} $LISP && echo "Arquivo copiado em $LISP" || exit 1

echo
echo
echo "It seems that the installation worked fine."
echo "Now you should include the following line in your .emacs"
echo "(load-file \"${LISP}/search-ccsb.elc\")"
echo 
echo

