make-release.sh: init script
This commit is contained in:
parent
3cf35ad1d0
commit
d83675d3a0
1 changed files with 22 additions and 0 deletions
22
scripts/make-release.sh
Executable file
22
scripts/make-release.sh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# usage: make-release.sh release
|
||||||
|
# Make a tarball of software excluding git history and leftover files
|
||||||
|
|
||||||
|
name="$(basename "$(pwd)")"
|
||||||
|
cd ../
|
||||||
|
cp -R "$name" "$1"
|
||||||
|
cd "$1"/
|
||||||
|
rm -fr .git
|
||||||
|
|
||||||
|
IFS="\n"
|
||||||
|
if [ -e .gitignore ]; then
|
||||||
|
for file in $(cat .gitignore); do
|
||||||
|
rm -fr "$file"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ../
|
||||||
|
|
||||||
|
tar -czf "$1".tar.gz "$1"
|
||||||
|
rm -r "$1"
|
||||||
|
cd "$name"/
|
Loading…
Add table
Add a link
Reference in a new issue