#!/usr/bin/perl
#
#

$debug = 1;

$cmd = "gifmerge -100 -l10 ";
$cmd .= " portrait_0.gif portrait_a1.gif portrait_b1.gif portrait_c1.gif ";
$cmd .= " portrait_b1.gif portrait_a1.gif portrait_0.gif ";
$cmd .= " portrait_d1.gif portrait_e1.gif portrait_f1.gif ";
$cmd .= " portrait_e1.gif portrait_d1.gif ";
$cmd .= " > portrait_anim_1.gif ";

$ret = exec_cmd($cmd);


exit 0;




##############################################################################
# PROCEDURE: exec_cmd
#
# DESCRIPTION: Execute the given shell command line.  If the $debug flag
#              is set, we print to stdout the command line, and
#              also print out the result string.
#
# RETURNS:
#              the result of the command
#
#
sub exec_cmd {

  my($cmd, $ret);

  $cmd = $_[0];

  if ($debug > 0) {
    printf "cmd is ..$cmd.. \n";
  }
  $ret = `$cmd`;
  if ($debug > 0) {
    printf "ret is ..$ret.. \n";
  }

  return($ret);
}


