Skip to content

Commit

Permalink
made release.sh nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
panzi committed Jun 25, 2021
1 parent 3797896 commit 1067592
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

set -e

pkg=mediaextract-`git describe --tags`
pkg=mediaextract-$(git describe --tags)

rm -r $pkg $pkg.zip 2>/dev/null || echo
git clone . $pkg/source
rm -rf $pkg/source/.git $pkg/source/.gitignore
mv $pkg/source/README.md $pkg
rm -r "$pkg" "$pkg.zip" 2>/dev/null || echo
git clone . "$pkg/source"
rm -rf "$pkg/source/.git" "$pkg/source/.gitignore"
mv "$pkg/source/README.md" "$pkg"
for target in linux32 linux64 win32 win64; do
builddir=build-$target
make TARGET=$target || exit $?
if [ -d $builddir ]; then
mkdir $pkg/$builddir
make TARGET=$target "-j$(nproc)"
if [[ -d "$builddir" ]]; then
mkdir "$pkg/$builddir"

if [ -f $builddir/mediaextract ]; then
cp $builddir/mediaextract $pkg/$builddir
elif [ -f $builddir/mediaextract.exe ]; then
cp $builddir/mediaextract.exe $pkg/$builddir
if [[ -f "$builddir/mediaextract" ]]; then
cp "$builddir/mediaextract" "$pkg/$builddir"
elif [ -f "$builddir/mediaextract.exe" ]; then
cp "$builddir/mediaextract.exe" "$pkg/$builddir"
fi
fi
done
zip -r9 $pkg.zip $pkg
zip -r9 "$pkg.zip" "$pkg"

0 comments on commit 1067592

Please sign in to comment.