#!/bin/csh -f

if ($#argv != 2) then
  echo "USAGE: 03_skycal.cmd (label) [commit]"
  exit 2
endif

set label = $1
if ("$2" == "commit") then
  set pretend = ""
else
  set pretend = "-pretend"
endif

set common_opts = ""
set common_opts = "$common_opts -dbname gpc1"
set common_opts = "$common_opts -defineskycalrun"
set common_opts = "$common_opts -set_workdir neb://@HOST@.0/SAS2/$label"
set common_opts = "$common_opts -set_label $label"
set common_opts = "$common_opts -set_data_group $label"
set common_opts = "$common_opts -set_dist_group SAS"

set common_opts = "$common_opts -select_label $label"
set common_opts = "$common_opts -simple"

staticskytool $pretend $common_opts
