HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/libdate-pcalc-perl/examples/tools/compile.sh
#!/bin/sh

###############################################################################
##                                                                           ##
##    Copyright (c) 1998 - 2009 by Steffen Beyer.                            ##
##    All rights reserved.                                                   ##
##                                                                           ##
##    This program is free software; you can redistribute it                 ##
##    and/or modify it under the same terms as Perl.                         ##
##                                                                           ##
###############################################################################

self=`basename $0`

if [ $# = 0 ]
then
    echo "Usage:  $self  <main>[.c]  [ <other.c> ]*"
    exit 0
fi

main=`basename $1 .c`

if [ -f "$main.c" ]
then
    shift
    gcc -ansi -O2 -o $main $main.c "$@"
else
    echo "$self: file '$main.c' does not exist!"
fi