#!/bin/sh
#
# typical usage:  tweakall /usr/local/bin/perl
# or (from csh):  tweakall `which perl`

# (better to use:  tweakall "`which perl` -w"
#  if you're developing JR and trying to debug these scripts)


# sanity check
if [ $# -ne 1 ]
then
   echo "usage: $0 pathname_for_perl"
   exit 1
fi

for file in ccr2jr clean_jrGen csp2jr \
            jfindmain jgo jgox jr jr_rmic \
            jrc jrfindmain jrgo jrgox jrrun m2jr
do
    echo tweaking $file

    # quick and dirty
    tmp=tmp.$file
    mv $file $tmp
    echo "#!$1" > $file
    tail -n +2 $tmp >> $file
    chmod +x $file
    rm $tmp

done
