Project

General

Profile

Download (505 Bytes) Statistics
| Branch: | Tag: | Revision:

root / tools / check-git2python-packaging.sh @ master

1
#!/bin/bash
2

    
3
if [ ! -f setup.py ]; then
4
	echo Not in a python package root directory, no setup.py file
5
	exit 1
6
fi
7

    
8
echo Cleaning...
9
rm -rf dist/ build/ *.egg-info/
10

    
11
echo Building distribution file...
12
python setup.py sdist
13

    
14
if [ -d .git ]; then
15
	DIST=`ls dist/*.tar.gz`
16
	NAME=`basename $DIST | sed s/\\.tar\\.gz//`
17
	echo $DIST
18
	echo $NAME
19
	echo "tar tzf $DIST | sed s/$NAME\/// | grep -v '/$' | sort -u"
20
	diff -ub <(git ls-files|sort) <(tar tzf $DIST | sed s/$NAME\\/// | grep -v '/$' | sort -u) | less
21
fi
    (1-1/1)