File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ IFS="$(printf '\n \t')"
48
48
49
49
function cleanup () {
50
50
rm -f $TMPFILE
51
+ rm -f $TMPLIST
51
52
rm -f $TOARCHIVE
52
53
IFS=" $OLD_IFS "
53
54
}
188
189
OLD_PWD=" ` pwd` "
189
190
TMPDIR=${TMPDIR:-/ tmp}
190
191
TMPFILE=` mktemp " $TMPDIR /$PROGRAM .XXXXXX" ` # Create a place to store our work's progress
192
+ TMPLIST=` mktemp " $TMPDIR /$PROGRAM .submodules.XXXXXX" `
191
193
TOARCHIVE=` mktemp " $TMPDIR /$PROGRAM .toarchive.XXXXXX" `
192
194
OUT_FILE=$OLD_PWD # assume "this directory" without a name change by default
193
195
246
248
if [ $VERBOSE -eq 1 ]; then
247
249
echo -n " archiving submodules..."
248
250
fi
251
+ git submodule >> " $TMPLIST "
249
252
while read path; do
250
- TREEISH=$( git submodule | grep " ^ .*${path%/ } " | cut -d ' ' -f 2) # git submodule does not list trailing slashes in $path
253
+ TREEISH=$( grep " ^ .*${path%/ } " " $TMPLIST " | cut -d ' ' -f 2) # git submodule does not list trailing slashes in $path
251
254
cd " $path "
252
255
git archive --format=$FORMAT --prefix=" ${PREFIX} $path " $ARCHIVE_OPTS ${TREEISH:- HEAD} > " $TMPDIR " /" $( echo " $path " | sed -e ' s/\//./g' ) " $FORMAT
253
256
if [ $FORMAT == ' zip' ]; then
You can’t perform that action at this time.
0 commit comments