-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·28 lines (27 loc) · 1004 Bytes
/
Copy pathrelease.sh
File metadata and controls
executable file
·28 lines (27 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -e
VERSION=`cat configure|grep PACKAGE_VERSION=\'|head -n 1|sed -e 's/.*='\''//' -e 's/'\''//'`
SOURCE=`pwd`
cd ..
rm -Rf "ocp-$VERSION" "ocp-$VERSION.tar".* "ocp-$VERSION.7z" "ocp-windows-32bit-$VERSION.zip" "ocp-windows-32bit-$VERSION.zip"
git clone "$SOURCE" "ocp-$VERSION"
cd "ocp-$VERSION"
git submodule update --init --recursive
rm .git -Rf
rm -Rf "`find|grep .gitignore`"
rm -Rf "`find|grep .gitmodules`"
rm -Rf "`find -type d|grep .github`"
cd ..
tar c "ocp-$VERSION" | gzip -9 -n > "ocp-$VERSION".tar.gz
tar c "ocp-$VERSION" | bzip2 -9 > "ocp-$VERSION".tar.bz2
tar c "ocp-$VERSION" | xz -9 > "ocp-$VERSION".tar.xz
tar c "ocp-$VERSION" | lzma -z -9 > "ocp-$VERSION".tar.lzma
7z a -mx9 "ocp-$VERSION".7z "ocp-$VERSION"
cd "ocp-$VERSION"
mingw/build.sh i686-w64-mingw32
mingw/build.sh x86_64-w64-mingw32
cd i686-w64-mingw32-install
zip -r -9 "../../ocp-windows-32bit-$VERSION.zip" .
cd ../x86_64-w64-mingw32-install
zip -r -9 "../../ocp-windows-64bit-$VERSION.zip" .
cd ..