#!/bin/sh
#
# Filename: newtool
# Copyright (C) 1999, 2000 Czo <Olivier.Sirol@lip6.fr>
# License: GPL (http://www.gnu.org/copyleft/gpl.html)
# Started: April 2000
# Last Change: Tuesday 22 May 2001, 17:02
# Edit Time: 0:29:44
# Description:
#
# $Id: newtool,v 1.1 2001/05/22 15:09:33 czo Exp $
#


if [ $# -ne 3 ]
then
 echo "`basename $0` error : bad args"
 echo "Usage : `basename $0`"
 exit 1
else

TARGET=$1
OLDTOOL=$2
NEWTOOL=$3

echo '#!/bin/sh
#             ,,,
#            (o o)
####=====oOO--(_)--OOO=========================================####
#
# Author      : Olivier.Sirol@lip6.fr
# Started on  : mai 2001
# Description : 

error()
{

echo " "
echo "                @@@@@@@@@                                       "
echo "                  @@    @                                       "
echo "                  @@     @                                      "
echo "                  @@        @@@ @@@  @@@ @@@     @@@    @@@ @@@ "
echo "                  @@   @     @@@  @@  @@@  @@  @@   @@   @@@  @@"
echo "                  @@@@@@     @@   @@  @@   @@ @@     @@  @@   @@"
echo "                  @@   @     @@       @@      @@     @@  @@     "
echo "                  @@         @@       @@      @@     @@  @@     "
echo "                  @@      @  @@       @@      @@     @@  @@     "
echo "                  @@     @   @@       @@       @@   @@   @@     "
echo "                @@@@@@@@@@  @@@@     @@@@        @@@    @@@@    "
echo " "
}
        

error

echo "ERROR: The tool \"OLDTOOL\" has been replaced with \"NEWTOOL\""
echo "NEWTOOL has not the same command line syntax : please run \"man NEWTOOL\""
echo "You can still run \"OLDTOOL\" by running \"obsolete_OLDTOOL\","
echo "but it will disapear in future releases of Alliance"

exit 1
' | sed sNEWTOOL$NEWTOOLg | sed sOLDTOOL$OLDTOOLg > $TARGET/$OLDTOOL

chmod +x $TARGET/$OLDTOOL
        
fi
