Commit 18784e96 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Improve windows release script by using osc.

Using osc makes fetching rpm files more realiable.
parent 27a444cf
......@@ -4,6 +4,10 @@
#
# Author: Ralf Habacker <ralf.habacker@freenet.de>
#
# requirements:
#
# osc - opensuse command line client
#
# syntax: release-windows-packages <mode>
#
# where mode is:
......@@ -18,7 +22,7 @@
# all - performs all above mentioned steps
#
ARCH=openSUSE_13.2
VERSION=2.20.3
VERSION=2.20.80
BASEURL64=http://download.opensuse.org/repositories/windows:/mingw:/win64/${ARCH}
BASEURL32=http://download.opensuse.org/repositories/windows:/mingw:/win32/${ARCH}
......@@ -35,41 +39,31 @@ clean)
rm -rf work/*
;;
fetch)
curl -o work/test64-noarch.txt ${BASEURL64}/noarch/
curl -o work/test32-noarch.txt ${BASEURL32}/noarch/
curl -o work/test32-src.txt ${BASEURL32}/src/
;;
download)
u1=$(grep umbrello-installer-$VERSION work/test64-noarch.txt | gawk 'BEGIN {FS="\""}; { print URL "/" $6}' URL=${BASEURL64}/noarch/)
u2=$(grep umbrello-portable-$VERSION work/test64-noarch.txt | gawk 'BEGIN {FS="\""}; { print URL "/" $6}' URL=${BASEURL64}/noarch/)
u3=$(grep umbrello-installer-$VERSION work/test32-noarch.txt | gawk 'BEGIN {FS="\""}; { print URL "/" $6}' URL=${BASEURL32}/noarch/)
u4=$(grep umbrello-portable-$VERSION work/test32-noarch.txt | gawk 'BEGIN {FS="\""}; { print URL "/" $6}' URL=${BASEURL32}/noarch/)
u5=$(grep umbrello-$VERSION work/test32-src.txt | gawk 'BEGIN {FS="\""}; { print URL "/" $6}' URL=${BASEURL32}/src/)
urls="$u1 $u2 $u3 $u4 $u5"
# download files
for i in $(echo $urls); do
filename=$(basename $i)
files="$files $filename"
wget -c -O work/$filename $i
done
cd work
rm -rf binaries
osc getbinaries windows\:mingw:\win32 mingw32-umbrello-installer $ARCH x86_64
osc getbinaries windows\:mingw:\win64 mingw64-umbrello-installer $ARCH x86_64
osc getbinaries windows\:mingw:\win32 mingw32-umbrello $ARCH x86_64 --sources
# we only need once source package
#osc getbinaries windows\:mingw:\win64 mingw64-umbrello openSUSE_13.2 x86_64 --sources
;;
unpack)
files=$(cd work; ls *.rpm)
mkdir -p work/tmp
# unpack rpms
rm -rf work/tmp
mkdir -p work/tmp
cd work
files=$(find binaries -name *installer* -o -name *portable* -o -name *src* | grep "$VERSION")
if test -d tmp; then
rm -rf tmp
fi
mkdir -p tmp
for i in $(echo $files); do
(cd work/tmp; rpm2cpio ../$i | cpio -idmv)
(cd tmp; rpm2cpio ../$i | cpio -idmv)
done
# move binary packages
rm -rf work/out
mkdir -p work/out
find work/tmp/ -name '*.exe' -exec mv {} work/out \;
find work/tmp/ -name '*.7z' -exec mv {} work/out \;
rm -rf out
mkdir -p out
find tmp/ -name '*.exe' -exec mv {} out \;
find tmp/ -name '*.7z' -exec mv {} out \;
;;
repack)
......@@ -100,7 +94,6 @@ ticket)
;;
all)
$0 clean
$0 fetch
$0 download
$0 unpack
$0 repack
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment