/[pdpsoft]/trunk/userspace-package-management/site-pkg-install.sh
ViewVC logotype

Contents of /trunk/userspace-package-management/site-pkg-install.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1904 - (show annotations) (download) (as text)
Tue Aug 31 12:32:09 2010 UTC (12 years, 1 month ago) by dennisvd
File MIME type: application/x-shellscript
File size: 886 byte(s)
initial checkin of scripts

1 #!/bin/sh
2
3 # Install software at a given site, using pkgsrc-cmd.
4
5 # Site is first argument
6 # the software is the remainder
7 delegation=dennis
8
9 site=$1
10
11 shift
12
13 resource=`awk '$1='$site' { print $2 }`
14
15 if [ -z $resource ] ; then
16 echo "Resource for site '$site' not found in resources.dat" > /dev/stderr
17 exit 1
18 fi
19
20
21 if [ $# -lt 1 ] ; then
22 echo "Usage: $0 <site> package [ package ... ]" > /dev/stderr
23 exit 1
24 fi
25
26 jdl=`mktemp site-install.jdl-XXXXXXXXXX`
27 cat > $jdl <<EOF
28 Executable = "pkgsrc-cmd.sh";
29 Arguments = "install $@";
30 Stdoutput = "stdout";
31 StdError = "stderror";
32 InputSandbox = "../pkgsrc-cmd.sh";
33 OutputSandbox = {"stdout","stderror"};
34 EOF
35
36 glite-wms-job-submit -d $delegation -o jids -r $resource $jdl
37 if [ $? -ne 0 ]; then
38 echo "Failed to submit job $jdl to $resource" > /dev/stderr
39 exit 1
40 fi
41
42 echo "Job submitted; check back later for results."
43
44 exit 0
45

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28