We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dc5e391 + 075b88c commit f3d27b0Copy full SHA for f3d27b0
git-archive-all
@@ -0,0 +1,22 @@
1
+#!/bin/bash
2
+
3
+# Super basic tool to export repo and all submodules
4
+# as a single zip file
5
6
+# USAGE: git archive-all foo
7
+# generates foo.zip
8
9
+OUTFILE=$1
10
11
+git ls-files --cached --full-name --no-empty-directory -z \
12
+ | xargs -0 zip "$OUTFILE.zip" > /dev/null
13
14
+git submodule --quiet foreach --recursive \
15
+ 'perl -e "
16
+ print join qq(\0),
17
+ map qq($path/\$_),
18
+ split /\0/,
19
+ qx(git ls-files -z --cached --full-name --no-empty-directory);
20
+ print qq(\0)"
21
+ ' | xargs -0 zip "$OUTFILE.zip" > /dev/null
22
0 commit comments