diff --git a/.gitignore b/.gitignore index 53dc5af1..862542ed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build/ \#*# .#* *~ +*.swp # This directory should be generated by bin/xmlns-build: suse2013-ns/ diff --git a/ChangeLog b/ChangeLog index 2b225aa7..7957ee8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Tue Jun 30 08:12:00 UTC 2015 - fsundermeyer@opensuse.org +Tue Jul 01 16:40:00 UTC 2015 - toms@opensuse.org Stable release 2.0.1 @@ -14,6 +14,7 @@ Stable release 2.0.1 - Infrastructure . Trying to fix an undef value error (bin/xslns-build) + . Fixed bin/xslns-build for building ns variant ------------------------------------------------------------------- Fri Jun 19 12:47:56 UTC 2015 - fsundermeyer@opensuse.org diff --git a/Makefile b/Makefile index d77c4c08..61bae56b 100644 --- a/Makefile +++ b/Makefile @@ -276,7 +276,7 @@ $(INST_DIRECTORIES) $(DEV_DIRECTORIES) $(BUILD_DIR): dist: | $(BUILD_DIR) @tar cfjh $(BUILD_DIR)/$(PACKAGE)-$(VERSION).tar.bz2 \ --exclude-from=$(DIST_EXCLUDES) \ - --transform 's:./:suse-xsl-stylesheets/:' . + --transform 's:./:suse-xsl-stylesheets-$(VERSION)/:' . @echo "Successfully created $(BUILD_DIR)/$(PACKAGE)-$(VERSION).tar.bz2" PHONY: dist-clean diff --git a/bin/xslns-build b/bin/xslns-build index 76497c17..7f269272 100755 --- a/bin/xslns-build +++ b/bin/xslns-build @@ -57,6 +57,7 @@ my @PassthruDirs = ( 'tools', 'build', 'slides', +'static', 'website', 'wordml', ); @@ -97,6 +98,10 @@ umask 002; $srcdir = $ARGV[0]; $destdir = $ARGV[1]; +# remove trailing slashes from srcdir and destdir +$srcdir =~ s:/$::; +$destdir =~ s:/$::; + unless ( $srcdir ) { print "ERROR: must specify input directory of non-namespaced " . " stylesheets. Exiting.\n"; @@ -218,41 +223,27 @@ sub copyXsl { foreach my $f (@xslfiles) { my $dest = $f; - - print STDOUT "===> dest_p: $dest\n"; - $dest =~ s/$srcdir/$destdir/; - - print STDOUT "===> dest_a: $dest\n"; - - my $basename = basename $f; - my $dirname = dirname $f; - -# $dest =~ m|^$destdir/(.*?)$|; -# my $file = $1; - - my $file = $dest; - $file =~ s/$destdir//; - - print STDOUT "...> file: $file\n"; - my $dir = dirname($file); - $dir = "" if $dir eq "."; + my ($checkfile, $checkdir) = fileparse($dest); + $checkdir =~ s:$destdir/::; + $checkdir =~ s:/$::; + my $checkpath = "$checkdir/".$checkfile; - if ( grep /^$basename$/,@PassthruFiles ) { + if ( grep /^$checkfile$/,@PassthruFiles ) { print STDOUT "unmodified $f\n"; copy($f, $dest); } - elsif ( $file && grep /^$file$/,@PassthruPath ) { + elsif ( $checkpath && grep /^$checkpath$/,@PassthruPath ) { print STDOUT "unmodified $f\n"; copy($f, $dest); } - elsif ( $dir && grep /^$dir$/, @PassthruDirs ) { + elsif ( $checkdir && grep /^$checkdir$/, @PassthruDirs ) { print STDOUT "unmodified $f\n"; copy($f, $dest); } else { -# print STDOUT " modified $f\n"; + print STDOUT " modified $f\n"; nsfilter($f, $dest); } }