Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ea15f3

Browse files
committed
Add --zip parameter; make this able to produce .zip files as well as
.tgz files.
1 parent 69f87c5 commit 8ea15f3

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

Doc/tools/mktarball.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ if [ "$1" = "-t" -o "$1" = "--tools" ] ; then
2020
shift 1
2121
TOOLS_ONLY=true
2222
fi
23+
if [ "$1" = "-z" -o "$1" = "--zip" ] ; then
24+
shift 1
25+
USE_ZIP=true
26+
fi
27+
if [ "$1" = "-g" -o "$1" = "--targz" ] ; then
28+
shift 1
29+
USE_ZIP=''
30+
fi
2331

2432
RELEASE=$1; shift
2533

@@ -48,11 +56,20 @@ if [ "$TOOLS_ONLY" ] ; then
4856
# remove the actual documents
4957
rm -rf api ext lib mac ref tut
5058
cd ..
51-
(tar cf - Doc | gzip -9 >$MYDIR/tools-$RELEASE.tgz) || exit $?
59+
if [ "$USE_ZIP" ] ; then
60+
pwd
61+
zip -r9 tools-$RELEASE.zip Doc || exit
62+
else
63+
(tar cf - Doc | gzip -9 >$MYDIR/tools-$RELEASE.tgz) || exit $?
64+
fi
5265
else
5366
cd $TEMPDIR
54-
55-
(tar cf - Python-$RELEASE | gzip -9 >$MYDIR/latex-$RELEASE.tgz) || exit $?
67+
if [ "$USE_ZIP" ] ; then
68+
zip -r9 $MYDIR/latex-$RELEASE.zip Python-$RELEASE || exit $?
69+
else
70+
(tar cf - Python-$RELEASE | gzip -9 >$MYDIR/latex-$RELEASE.tgz) \
71+
|| exit $?
72+
fi
5673
fi
5774
cd $MYDIR
5875
rm -r $TEMPDIR || exit $?

0 commit comments

Comments
 (0)