Initial git import
[sxemacs] / contrib / tar-build-failure.sh
1 #!/bin/sh
2 #
3 type tar >/dev/null 2>&1 && TAR=tar
4 EXT=gz
5 type gzip >/dev/null 2>&1 && COMPRESS=gzip
6 if [ -z "$COMPRESS"  ]; then
7     type compress >/dev/null 2>&1 && COMPRESS=compress
8     EXT=Z
9 fi
10 if [ ! -f ./sxemacs.pc -o ! -f ./Installation -o ! -f ./config.log ]; then
11     echo "Please run this script from the top of the sxemacs build directory.\n"
12     exit 1
13 fi
14 if [ -z "$TAR" -o -z "$COMPRESS" ]; then
15     echo "Could not find one or more of tar compress gzip"
16     exit 1
17 fi
18 for f in config.log Installation sxemacs_version.m4 ,,beta.out ,,vars.out ,,make-check.out src/config.h ; do
19     if [ -f $f ]; then
20         FILES="$FILES $f"
21     fi
22 done
23 attachment="build-failure.tar.${EXT}"
24 tar cf - $FILES  | $COMPRESS -c - > $attachment