]>
Commit | Line | Data |
---|---|---|
828950b9 | 1 | #!/usr/bin/env perl |
2 | ||
3 | #GPT_LOCATION and/or GLOBUS_LOCATION must be specified for most scripts | |
4 | #in the globus packages. for this reason, this script tests to see if | |
5 | #one of the two locations is defined. | |
6 | ||
7 | my $gpath=$ENV{GPT_LOCATION}; | |
8 | ||
9 | if(!defined($gpath)) | |
10 | { | |
11 | $gpath=$ENV{GLOBUS_LOCATION}; | |
12 | } | |
13 | ||
14 | if(!defined($gpath)) | |
15 | { | |
16 | die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"; | |
17 | } | |
18 | ||
19 | #uncomment when we're more mature | |
20 | #for my $subdir ('packaging_tools', 'package_management', 'archive_compress') { | |
21 | # chdir "$subdir" or die "Unable to cd to $subdir: $?"; | |
22 | # if(-e "config.cache") | |
23 | # { | |
24 | # #config.cache is tested for because it is generated when ./configure is executed | |
25 | # #if config.cache is present, then a make distclean must be performed in order | |
26 | # #to remove the cache. if a make distclean is run and config.cache is not | |
27 | # #present, then this script will recieve a zero from the system and error. | |
28 | # | |
29 | # system("make distclean"); | |
30 | # } | |
31 | # | |
32 | # chdir ".." or die "Unable to cd to packaging: $?"; | |
33 | #} | |
34 | ||
35 | # determine gpt version number | |
36 | #uncomment when we've got a better place to get the current version from | |
37 | #open (CFG, 'packaging_tools/configure.in'); | |
38 | # | |
39 | #my $version; | |
40 | #for (<CFG>) { | |
41 | # if (m!AM_INIT_AUTOMAKE\(\w+,([^,\)]+)!) { | |
42 | # $version = $1; | |
43 | # $version =~ s!\s+!!g; | |
44 | # } | |
45 | #} | |
46 | ||
03f2799b | 47 | printf("moving files into source directory...\n"); |
48 | system("mkdir ../gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?"; | |
49 | system("cp -rf * ../gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?"; | |
50 | system("mv ../gpt-gsi-openssh ./gpt-gsi-openssh")==0 or die "Unable to move directory: $?"; | |
51 | ||
52 | chdir("./gpt-gsi-openssh"); | |
53 | ||
7a19f317 | 54 | printf("running autoheader...\n"); |
55 | system("autoheader")==0 or die "Could not run autoheader: $?"; | |
56 | ||
57 | printf("running autoconf...\n"); | |
58 | system("autoconf")==0 or die "Could not run autoheader: $?"; | |
59 | ||
828950b9 | 60 | #system("tar -cf gpt-$version.tar gpt-$version")==0 or die "Unable to create gpt_bundle.tar: $?"; |
61 | #system("gzip -f gpt-$version.tar")==0 or die "Unable to gzip gpt_bundle.tar: $?"; | |
62 | #system("rm -rf gpt-$version")==0 or die "Unable to create gpt_bundle.tar: $?"; | |
63 | ||
03f2799b | 64 | printf("pruning source directory of extraneous files...\n"); |
65 | system("rm -rf `find . -name CVS -print`")==0 or die "Unable to remove cvs directories: $?"; | |
66 | system("rm -f ./make_gpt_dist")==0 or die "Unable to remove gpt script: $?"; | |
67 | system("rm -rf ./gpt")==0 or die "Unable to remove gpt directory: $?"; | |
68 | ||
69 | chdir("../"); | |
70 | ||
7a19f317 | 71 | printf("creating source tarball... gsi-openssh.\n"); |
828950b9 | 72 | system("tar -cf gsi-openssh.tar ./gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?"; |
73 | system("gzip -f gsi-openssh.tar")==0 or die "Unable to gzip gpt_bundle.tar: $?"; | |
74 | system("rm -rf ./gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?"; |