Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
32360831
Unverified
Commit
32360831
authored
4 years ago
by
Sebastian Schmitt
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Shell script to create a dep-free tar ball (#1368)
parent
98c6e95a
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
scripts/create_tarball.sh
+50
-0
50 additions, 0 deletions
scripts/create_tarball.sh
with
50 additions
and
0 deletions
scripts/create_tarball.sh
0 → 100755
+
50
−
0
View file @
32360831
#!/usr/bin/env bash
# creates a tar ball of Arbor for e.g. releases
#
# checks out repo at a specific branch/commit/tag
# strips version control,
# but leaves (empty) .git directories of submodules (CMake checks for it)
set
-Eeuo
pipefail
if
[[
"$#"
-ne
3
]]
;
then
echo
"usage: create_tarball.sh path_to_repo branch/commit/tag path_to_output_tarball"
exit
1
fi
trap
cleanup SIGINT SIGTERM ERR EXIT
cleanup
()
{
trap
- SIGINT SIGTERM ERR EXIT
rm
-rf
"
$TMP_DIR
"
}
TMP_DIR
=
$(
mktemp
-d
)
REPO
=
$1
CHECKOUT
=
$2
OUT_TARBALL
=
$3
if
[[
!
"
$TMP_DIR
"
||
!
-d
"
$TMP_DIR
"
]]
;
then
echo
"Could not create temporary directory"
exit
1
fi
REPO_NAME
=
arbor
cd
"
$TMP_DIR
"
git clone
"
$REPO
"
$REPO_NAME
cd
"
$REPO_NAME
"
git checkout
"
$CHECKOUT
"
git submodule init
git submodule update
# remove all version control files but not the .git directories themselves
rm
-vrf
--
**
/.git/
*
# remove main .git, only submodule .gits are still present
rm
-vrf
.git
# create tar ball
cd
..
tar
vcfz
"
$OUT_TARBALL
"
$REPO_NAME
This diff is collapsed.
Click to expand it.
Preview
0%
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