From a7aeabf215584dbabd0c199d5a0030f6af934e2d Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Wed, 27 Apr 2016 18:59:52 +0200 Subject: [PATCH] added simple helper to cleanly install (and remove) the packages in the right order --- tivsm-helper.pl | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 tivsm-helper.pl diff --git a/tivsm-helper.pl b/tivsm-helper.pl new file mode 100755 index 0000000..78cc10b --- /dev/null +++ b/tivsm-helper.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +use strict; + +my %packages= ( + 'gskcrypt64' => 'gskcrypt64_8.0-50.52.linux.x86_64.deb', + 'gskssl64' => 'gskssl64_8.0-50.52.linux.x86_64.deb', + 'tivsm-filepath' => 'tivsm-filepath-7.1.4-0.deb', + 'tivsm-api64' => 'tivsm-api64.amd64.deb', + 'tivsm-apicit' => 'tivsm-apicit.amd64.deb', + 'tivsm-ba' => 'tivsm-ba.amd64.deb', + 'tivsm-bacit' => 'tivsm-bacit.amd64.deb', + 'tivsm-bahdw' => 'tivsm-bahdw.amd64.deb', + 'tivsm-jbb' => 'tivsm-jbb.amd64.deb' +); + +my @packages= qw( + gskcrypt64 + gskssl64 + tivsm-filepath + tivsm-api64 + tivsm-apicit + tivsm-ba + tivsm-bacit + tivsm-bahdw + tivsm-jbb +); + +print "packages: [", join (' ', @packages), "]\n"; + +my %op_modes= map { $_ => 1 } qw(show remove install); +my $op_mode= 'show'; + +while (my $arg= shift (@ARGV)) +{ + if (exists($op_modes{$arg})) { $op_mode= $arg; } +} + + if ($op_mode eq 'show') + { + system ('dpkg', '-l', 'tivsm*'); + system ('dpkg', '-l', 'gsk*'); + } + elsif ($op_mode eq 'remove') + { + } + elsif ($op_mode eq 'install') + { + foreach my $pkg (@packages) + { + system ('dpkg', '--install', $packages{$pkg}); + } + } + -- GitLab