Browse Source

[dist] add script to show differences between git and dist

personal/stbuehler/wip
Stefan Bühler 6 years ago
parent
commit
449e672016
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      diff-dist-git.sh

+ 22
- 0
diff-dist-git.sh View File

@@ -0,0 +1,22 @@
#!/bin/sh

set -e

if [ ! -f "$1" ]; then
(
echo "Syntax: $0 [path-to-dist.tar.gz]"
echo
echo "Build such file with ./autogen.sh; ./configure; make dist-gzip"
echo "This tool can then be used to check the differences between the git"
echo "repository and the tar; it might show added files for autotools"
echo "(compile, configure, Makefile.in, m4, ...) and should remove"
echo ".gitignore files and some helper scripts (packdist.sh and this file)"
) >&2
exit 1
fi

tmpdir=$(mktemp --tmpdir -d diff-dist-tar-git-XXXXXXX)
trap 'rm -rf "${tmpdir}"' EXIT

git archive --format tar.gz -o "${tmpdir}/lighttpd.tar.gz" --prefix "lighttpd-2.0.0/" HEAD
tardiff --modified --autoskip "${tmpdir}/lighttpd.tar.gz" "$1"

Loading…
Cancel
Save