blob: fa65c4b74927e1914078a402703ba41de8c98e32 [file] [log] [blame]
#!/bin/bash
# Build an original tar-ball for a debian package free of a debian directory and
# .git.
version=`head -1 debian/changelog | sed 's/.*(//
s/-.*//'`
if [ "`basename $PWD`" != "sonic-$version" ]; then
echo "Directory name should be sonic-$version"
exit 1
fi
make clean
make -f debian/rules clean
echo "sonic_${version} (git: `git log -1 --oneline | sed 's/ .*//'`)" > version
cd ..
if ! tar -cvzf sonic_$version.orig.tar.gz --exclude-vcs --exclude=debian sonic-$version; then
echo "Could not create sonic_$version.orig.tar.gz"
exit 1
fi
echo "Successfully created sonic_$version.orig.tar.gz"