summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-12-03 01:58:28 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2011-12-03 01:58:28 +0100
commit907969d2642de3fda2d28be653770e95bcf54fbb (patch)
treea0fe416fd27108b82dc5560e50c4f00ab9471872 /bin
parentb93aad95120df2c40756f4ba06344eac2297d0ee (diff)
lo-pack-sources: unused function set_config_version()
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lo-pack-sources38
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/lo-pack-sources b/bin/lo-pack-sources
index 2bd9d84a5b48..1ecf2b7ed02b 100755
--- a/bin/lo-pack-sources
+++ b/bin/lo-pack-sources
@@ -27,44 +27,6 @@ sub get_config_version($)
return $version;
}
-# set libreoffice-build version in the given libreoffice-build sources
-sub set_config_version($$)
-{
- my ($lo_build_dir, $version) = @_;
- my $configure = "$lo_build_dir/configure.in";
-
- open (CONFIGURE, "$configure") ||
- die "can't open \"$configure\" for reading: $!\n";
-
- my ( $tmp_fh, $tmp_filename ) = tempfile( "$configure.XXXXXX" );
- if ( !defined $tmp_fh ) {
- close (CONFIGURE);
- die "Error: can't create temporary file: \"$configure.XXXXXX\"\n";
- }
-
- while (my $line = <CONFIGURE>) {
- chomp $line;
-
- if ($line =~ /^(\s*AC_INIT\s*\(\s*libreoffice-build\s*,\s*)([\w\.]*)(\s*\)\s*)$/) {
- print ${tmp_fh} "$1$version$3\n";
- } else {
- print ${tmp_fh} "$line\n";
- }
- }
- close (CONFIGURE);
- close (${tmp_fh});
-
- # preserve permissions on target file by applying them to temp file
- my ( $mode, $uid, $gid ) = ( stat($configure) )[ 2, 4, 5 ];
- $mode = $mode & 07777;
-
- chmod $mode, $tmp_filename;
- chown $uid, $gid, $tmp_filename;
-
- rename ($tmp_filename, $configure) ||
- die "Can't rename \"$tmp_filename\" to \"$configure\": $!\n";
-}
-
# increment the version for a test build:
# + add 'a' if the version ended with a number
# + bump the letter otherwise