2 # Check out a tagged maxima version
3 # Create a package using "make dist-gzip" and "git archive"
4 # Create a list of files in each package and a report of differences.
6 # Files which are in the archive created with 'git archive' but not in the archive with 'make dist-gzip'
7 # - might be missing in the GNU autoconf build system
8 # - might be obsolete and can maybe removed from git (after all it is a VCS, so older versions can be recovered...)
9 # - should be in the GIT repository but not in the distributed tarballs (why?).
10 # (if that is the case, they can be excluded from git archive exports using gitattributes (export-ignore))
12 # Files which are in the archive created with 'make dist-gzip' but not in the archive created with 'git archive'
13 # - are maybe generated files. One can probably remove them from the 'make dist-gzip'-archive (in the autoconf build system)
15 # Copyright (C) by Wolfgang Dautermann
16 # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
17 # This is free software: you are free to change and redistribute it.
18 # There is NO WARRANTY, to the extent permitted by law.
20 if [ "$#" -ne 1 ]; then
21 echo "Usage: $0 maximaversion"
22 echo "e.g.: $0 5.37.3"
23 echo " to package Maxima 5.37.3 from the git tag 5.37.3"
25 echo "I recommend, that $0 should be called from an empty directory"
32 # fetch Git tag $MAXIMAVERSION from Git repo into directory maxima-$MAXIMAVERSION
34 echo "fetching Git tag $MAXIMAVERSION from Sourceforge into maxima-$MAXIMAVERSION"
35 git archive
--format=tar --prefix=maxima-
$MAXIMAVERSION/ --remote=git
://git.code.sf.net
/p
/maxima
/code
$MAXIMAVERSION |
tar xf
-
38 # add "./configure" to the extracted git archive and package again
39 create_git_tarball
() {
40 echo "Running ./bootstrap (to create 'configure' and packaging again."
41 cd maxima-
$MAXIMAVERSION/
44 tar czf maxima-
$MAXIMAVERSION.
tar.gz maxima-
$MAXIMAVERSION
48 # add "./configure" by running ./bootstrap and package with "make dist-gzip"
49 create_autoconf_tarball
() {
50 echo "Packaging with 'make dist-gzip'."
51 cd maxima-
$MAXIMAVERSION/
58 # create list of files in both tarballs and a list of differences.
59 create_list_of_files
() {
60 echo "Creating a list of files in both archives and differences."
61 tar tzf maxima-
$MAXIMAVERSION/maxima-
$MAXIMAVERSION.
tar.gz |
sort >dist-gzip-files
62 tar tzf maxima-
$MAXIMAVERSION.
tar.gz |
sort >git-archive-files
63 diff -u dist-gzip-files git-archive-files
>differences_git-archive_dist-gzip
68 create_autoconf_tarball
72 echo "------------------------------------------------------------"
73 echo "Created maxima-$MAXIMAVERSION.tar.gz (packaged with git archive)"
74 echo "Created maxima-$MAXIMAVERSION/maxima-$MAXIMAVERSION.tar.gz (packaged with make dist-gzip)"
76 echo "Created a list of files in each archive"
77 echo "Created a difference of these files in 'differences_git-archive_dist-gzip'"
78 echo "Review these differences."