Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 06301e344485d8cbfe91b94d487b7c4c0e575702 (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#--------------------------------------------------------------------------------
# Copyright (c) 2015 CEA LIST.
#
#    
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#	 CEA LIST
#--------------------------------------------------------------------------------

rcpProductDir=${WORKSPACE}/releng/rcp/org.eclipse.papyrus.rcp.product/target/products
rcpProductFinalDir=${WORKSPACE}/products
TMP=${rcpProductDir}/tmp
papyrusMacApp=Papyrus.app
papyrusWinApp=papyrus.exe

mkdir $rcpProductFinalDir

#Proceed with Windows
cd $rcpProductDir
for f in *win32*; do
	echo "Repackaging $f"

	if [[ $f == *x86_64* ]]; then
		bitness=64
	else
		bitness=32
	fi

	rm -rf $TMP
	mkdir $TMP
	cd $TMP
	
	unzip -qq $rcpProductDir/$f

	cd Papyrus

	echo "  Signing $papyrusWinApp"
	curl -o signed.exe -F filedata=@$papyrusWinApp http://build.eclipse.org:31338/winsign.php
	mv signed.exe $papyrusWinApp

	cd ..

	zip -r -9 -qq --symlinks $rcpProductFinalDir/papyrus-win-$bitness.zip Papyrus

	cd $rcpProductDir
	rm -rf $TMP
done

#Proceed with Linux
cd $rcpProductDir
for f in *linux*; do
	echo "Repackaging $f"

	if [[ $f == *x86_64* ]]; then
		bitness=64
	else
		bitness=32
	fi

	mv $rcpProductDir/$f $rcpProductFinalDir/papyrus-linux-$bitness.tar.gz
done

#Proceed with MacOSX
cd $rcpProductDir
for f in *macosx*; do
	echo "Repackaging $f"

	if [[ $f == *x86_64* ]]; then
		bitness=64
	else
		bitness=32
	fi

	rm -rf $TMP
	mkdir $TMP
	cd $TMP
	
	tar -xzf $rcpProductDir/$f

	echo "  Signing $papyrusMacApp"
	zip -r -q unsigned.zip $papyrusMacApp
	rm -rf $papyrusMacApp
	curl -o signed.zip -F file=@unsigned.zip http://build.eclipse.org:31338/macsign.php
	unzip -qq signed.zip
	rm -f unsigned.zip signed.zip

	chmod a+x "$papyrusMacApp/Contents/MacOS/papyrus"
	tar -czf $rcpProductFinalDir/papyrus-macosx-$bitness.tar.gz $papyrusMacApp

	cd $rcpProductDir
	rm -rf $TMP
done

cd $rcpProductDir
rm -f *linux* *macosx* *win32*

Back to the top