#!/usr/pkg/bin/ruby40
#
# create a new university in the Repository
# Usage: createuni <Name of University>

require 'university'
require 'vapor'

# create an University give the name given on the commandline
name = ARGV.join(' ')
university = University.new( name )

# connect to Repository
pmgr = Vapor::PersistenceManager.new( Properties )

# make the new University persistent
pmgr.transaction.begin
  university.make_persistent
pmgr.transaction.commit
