File: convert.sh

package info (click to toggle)
libdate-pcalc-perl 1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 428 kB
  • ctags: 80
  • sloc: perl: 4,738; makefile: 42; sh: 18
file content (35 lines) | stat: -rwxr-xr-x 1,377 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

###############################################################################
##                                                                           ##
##    Copyright (c) 1998 by Steffen Beyer.                                   ##
##    All rights reserved.                                                   ##
##                                                                           ##
##    Modified 4-Aug-1999 J. David Eisenberg (removed compiles)              ##
##                                                                           ##
##    This program is free software; you can redistribute it                 ##
##    and/or modify it under the same terms as Perl.                         ##
##                                                                           ##
###############################################################################

self=`basename $0`

convert ()
{
    source=$1
    target="${source}_"
    if [ -f "$target" ]
    then
        echo "$self: skipping renaming of '$source': '$target' exists!" >&2
    else
        echo "$self: renaming '$source' to '$target'..."
        mv $source $target
    fi
    echo "$self: converting '$target' to '$source'..."
    perl ./iso2pc.pl -dos <$target >$source
}

convert '../Pcalc.pm'
convert '../examples/age_in_days_eu.pl'
convert '../examples/age_in_days_us.pl'