File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 35
35
# ##############################################################################
36
36
37
37
# DEBUGGING
38
- set -e
38
+ set -e # Exit on error (i.e., "be strict").
39
39
set -C # noclobber
40
40
41
41
# TRAP SIGNALS
220
220
if [ $VERBOSE -eq 1 ]; then
221
221
echo -n " creating superproject archive..."
222
222
fi
223
+ rm -f $TMPDIR /$( basename " $( pwd) " ) .$FORMAT
223
224
git archive --format=$FORMAT --prefix=" $PREFIX " $ARCHIVE_OPTS $TREEISH > $TMPDIR /$( basename " $( pwd) " ) .$FORMAT
224
225
if [ $VERBOSE -eq 1 ]; then
225
226
echo " done"
@@ -252,10 +253,11 @@ git submodule >>"$TMPLIST"
252
253
while read path; do
253
254
TREEISH=$( grep " ^ .*${path%/ } " " $TMPLIST " | cut -d ' ' -f 2) # git submodule does not list trailing slashes in $path
254
255
cd " $path "
256
+ rm -f " $TMPDIR " /" $( echo " $path " | sed -e ' s/\//./g' ) " $FORMAT
255
257
git archive --format=$FORMAT --prefix=" ${PREFIX} $path " $ARCHIVE_OPTS ${TREEISH:- HEAD} > " $TMPDIR " /" $( echo " $path " | sed -e ' s/\//./g' ) " $FORMAT
256
258
if [ $FORMAT == ' zip' ]; then
257
259
# delete the empty directory entry; zipped submodules won't unzip if we don't do this
258
- zip -d " $( tail -n 1 $TMPFILE ) " " ${PREFIX}${path%/ } " > /dev/null # remove trailing '/'
260
+ zip -d " $( tail -n 1 $TMPFILE ) " " ${PREFIX}${path%/ } " > /dev/null 2>&1 || true # remove trailing '/'
259
261
fi
260
262
echo " $TMPDIR " /" $( echo " $path " | sed -e ' s/\//./g' ) " $FORMAT >> $TMPFILE
261
263
cd " $OLD_PWD "
You can’t perform that action at this time.
0 commit comments