Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
afi-program-discover
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
afi
soft
apps
afi-program-discover
Commits
4a7eba86
Commit
4a7eba86
authored
4 years ago
by
Timur Gandjelashvili
Browse files
Options
Downloads
Patches
Plain Diff
git-archive-all bug fix
parent
2dd9457b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
git-archive-all.sh
+7
-2
7 additions, 2 deletions
git-archive-all.sh
with
7 additions
and
2 deletions
git-archive-all.sh
+
7
−
2
View file @
4a7eba86
...
...
@@ -187,7 +187,9 @@ while test $# -gt 0; do
done
OLD_PWD
=
"
`
pwd
`
"
TMPDIR
=
${
TMPDIR
:-
/tmp
}
#TMPDIR=${TMPDIR:-/tmp} # Timur Gandjelashvili bug fix
TMPDIR
=
`
mktemp
-d
`
# Timur Gandjelashvili bug fix - creating temporary dir
TMPFILE
=
`
mktemp
"
$TMPDIR
/
$PROGRAM
.XXXXXX"
`
# Create a place to store our work's progress
TMPLIST
=
`
mktemp
"
$TMPDIR
/
$PROGRAM
.submodules.XXXXXX"
`
TOARCHIVE
=
`
mktemp
"
$TMPDIR
/
$PROGRAM
.toarchive.XXXXXX"
`
...
...
@@ -226,6 +228,7 @@ if [ $VERBOSE -eq 1 ]; then
echo
"done"
fi
echo
$TMPDIR
/
$(
basename
"
$(
pwd
)
"
)
.
$FORMAT
>
|
$TMPFILE
# clobber on purpose
superfile
=
`
head
-n
1
$TMPFILE
`
if
[
$VERBOSE
-eq
1
]
;
then
...
...
@@ -269,6 +272,7 @@ fi
if
[
$VERBOSE
-eq
1
]
;
then
echo
-n
"concatenating archives into single archive..."
fi
# Concatenate archives into a super-archive.
if
[
$SEPARATE
-eq
0
-o
"-"
==
"
$OUT_FILE
"
]
;
then
if
[
$FORMAT
==
'tar.gz'
]
;
then
...
...
@@ -293,7 +297,6 @@ if [ $SEPARATE -eq 0 -o "-" == "$OUT_FILE" ]; then
done
cd
"
$OLD_PWD
"
fi
echo
"
$superfile
"
>
|
$TMPFILE
# clobber on purpose
fi
if
[
$VERBOSE
-eq
1
]
;
then
...
...
@@ -303,6 +306,7 @@ fi
if
[
$VERBOSE
-eq
1
]
;
then
echo
-n
"moving archive to
$OUT_FILE
..."
fi
while
read
file
;
do
if
[
"-"
==
"
$OUT_FILE
"
]
;
then
cat
"
$file
"
&&
rm
-f
"
$file
"
...
...
@@ -310,6 +314,7 @@ while read file; do
mv
"
$file
"
"
$OUT_FILE
"
fi
done
<
$TMPFILE
rm
-rf
$TMPDIR
if
[
$VERBOSE
-eq
1
]
;
then
echo
"done"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment