# Copyright 2004 by Sun Microsystems, Inc.
# All rights reserved.

# File
# ----
# shell script
# 
# Description
# -----------
# bash utility

#pragma ident  "@(#)main.bash 1.1     04/05/12 SMI"

#!/bin/bash

set -xv 
test "X$OS" = "Xlinux" 

#if [ $? != 1 ]
#then 
    nb_line=`grep -n main $1 | cat | cut -d':' -f1`
    let nb_line=$nb_line-1
    sed -e '${nb_line}d' $1
    cmd="sed -e '${nb_line}d' $1 > /tmp/Service_svc.c.main"
    eval $cmd
    cp /tmp/Service_svc.c.main $1
    rm -f /tmp/Service_svc.c.main
#fi
