-NAME=tinyos-tools
-VERSION=1.2.2
+NAME="$1"
+VERSION="$2"
+OUTPUT_FILE="$3"
-cd ../..
-rm -rf $NAME-$VERSION
-tools/release/extractor $NAME-$VERSION <<'EOF' | gzip >../$NAME-$VERSION.tar.gz
+pushd ../../
+./tools/release/extractor $NAME-$VERSION $OUTPUT_FILE <<'EOF'
+!^./tinyos.sh
+!^./tos.mk
+!^./debian
+!^./(patch|configure|build|install)-stamp
!^./apps
!^./doc
!^./support
!^./tools/release
!^./tos
-!^./README|overall-todo.txt
+!^./README|overall-todo.txt|release-notes.txt
!/.cvsignore
!/CVS/
!/CVS$
+!/.svn/
+!/.svn$
+!^./.git
+!^./.gitignore
+!^./.gbp.conf
!~$
!#
EOF
-rm -rf $NAME-$VERSION
+popd