#!/bin/bash
# -*- sh -*- Java Training Wheels installer module

### Copyright (C) 2016 Davin Pearson

### Maintainer: Davin Pearson <davin.pearson@gmail.com>
### Keywords: Java Training Wheels installer module

### This program is not part of GNU Emacs

### This program is free software: you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation, either version 3 of the License, or (at
### your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
### General Public License for more detail.
###
### You should have received a copy of the GNU General Public License
### along with GNU Emacs, see the file COPYING.  If not, see:
###
### <http://www.gnu.org/licenses/gpl.txt>.

### Commentary:

### This configure script calls Emacs' batch mode on
### install-stuff/jtw-install-and-uninstall.el

VAR="";
for X in $@ ; do
case "$X" in
    -v | --v | --ve | --ver | --vers | --versi | --versio | --version)
            printf "*** Welcome to Java Training Wheels installer module. Version 2.0\n";
            VAR="t";;
    -h | --h | --he | --hel | --help)
            echo "*** Usage: ./configure [OPTION]";
            echo "options currently available:";
            echo "--prefix=<prefixdir> Sets the value of --prefix on the command line, rather than through the read prompt.";
            VAR="t";;
esac ; done

if [[ -z $VAR ]] ; then
    printf "(setq args \"$@\")\n";
    emacs --batch --load install-stuff/jtw-install-and-uninstall.el --eval "(setq args \"$@\")" --funcall do-install
fi


