simple perl ogo install script

Kelley G <[email protected]>
Newsgroups gmane.comp.cms.opengroupware.discuss.general
Message-ID <[email protected]>
hello all:

here's a simple ogo install script.  released under the LGPL.
currently accepts two commands, install and remove.
works for redhat9... not tested yet under any other distributions.
maybe some of you will check it out and make additions post the diffs back.

add to the todo if you want.

enjoy,

kelley graham
http://www.toasterz.com
add_remove_ogo.pl (text/plain, 2.7 KB)
#! /usr/bin/perl

# This is a simple perl script for installing ogo from rpms. I use redhat9 and it works for my needs. Use at your own risk. If it breaks your system, sorry, but I'm not liable for any losses or damages, etc. whatsoever.
# Copyright 2003 Kelley Graham http://www.toasterz.com

# License: LGPL

# Changelog ##############################################################
# 13July2003
#	-added comand line var and rudimentary sanity checks
# 12July2003 
#	-initial cobbling together
#	-added libical before xml
#	-removed libxmlsaxdriver line since it is included in the xml package

# Todo ###################################################################
# 
#	-add support for other distros (community help?)
#	-change spec files to create user ogo-whatever where needed
#	-when packages settle down, start one spec file for
#	 'monolithic' rpm install from rpm-all tarball


if ( $ARGV[0] eq "install") {
	print "Adding Opengroupware.org Packages...\n\n";
	$ACTION = "Uvh";
	doit();
	print "Remember to setup PostgresQL."
	exit;
}

if ( @ARGV[0] eq "remove") {
	print "Removing Opengroupware.org Packages...\n\n";
	$ACTION = "e";
	doit();
	exit;
}

# If we get here then there's an improper command line var. Echo Usage and exit.
print "\nUsage: add_remove_ogo.pl <install|remove>\n";
print "Pass the script \"install\" to install-upgrade Opengroupware.\n";
print "Pass the script \"remove\" to remove Opengroupwware.\n\n";
exit;

sub doit() {

  `rpm -$ACTION opengroupware-gstep-make*.rpm`;
  `rpm -$ACTION opengroupware-gstep-objc*.rpm`;
  `rpm -$ACTION opengroupware-libfoundation*.rpm`;
  `rpm -$ACTION opengroupware-js*.rpm`;
  `rpm -$ACTION opengroupware-libxml2*.rpm`;
  `rpm -$ACTION opengroupware-libical-*.rpm`;	  

  `rpm -$ACTION opengroupware-xml*.rpm`;
  `rpm -$ACTION opengroupware-core*.rpm`;
  `rpm -$ACTION opengroupware-gstep-db*.rpm`;
  `rpm -$ACTION opengroupware-gstep-db-postgresql72*.rpm`;
  `rpm -$ACTION opengroupware-sope*.rpm`;

  `rpm -$ACTION opengroupware-env*.rpm`;
  `rpm -$ACTION opengroupware-logic*.rpm`;
  `rpm -$ACTION opengroupware-docapi*.rpm`;
  `rpm -$ACTION opengroupware-database*.rpm`;
  `rpm -$ACTION opengroupware-webui-libs*.rpm`;
  `rpm -$ACTION opengroupware-webui-common*.rpm`;
  `rpm -$ACTION opengroupware-webui-admin*.rpm`;
  `rpm -$ACTION opengroupware-webui-app*.rpm`;
  `rpm -$ACTION opengroupware-webui-contact*.rpm`;
  `rpm -$ACTION opengroupware-webui-job*.rpm`;
  `rpm -$ACTION opengroupware-webui-mailer*.rpm`;
  `rpm -$ACTION opengroupware-webui-news*.rpm`;
  `rpm -$ACTION opengroupware-webui-prefs*.rpm`;
  `rpm -$ACTION opengroupware-webui-resource-en*.rpm`;
  `rpm -$ACTION opengroupware-webui-scheduler*.rpm`;
  `rpm -$ACTION opengroupware-theme-default-en*.rpm`
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.