FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bc-java/bnd.sh at 1.81.X · bcgit/bc-java · GitHub
bcgit
bc-java
Repository navigation
Code
Issues
65
(65)
Pull requests
21
(21)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
bc-java
/
bnd.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
46 lines (40 loc) · 1.34 KB
Breadcrumbs
bc-java
/
bnd.sh
Copy path
File metadata and controls
executable file
·
46 lines (40 loc) · 1.34 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/sh
JAVA_HOME=/opt/jdk1.5.0
export
JAVA_HOME
PATH=
$JAVA_HOME
/bin:
$PATH
export
PATH
for
jarFile
in
$*
do
base=
`
basename
$jarFile
.jar
`
javaVersion=
`
echo
$base
|
sed -e
"
s/.*\(jdk..\).*/
\\
1/
"
`
name=
`
echo
$base
|
sed -e
"
s/\([^-]*\)-jdk.*/
\\
1/
"
`
bcVersion=
`
echo
$base
|
sed -e
"
s/
$name
-
${javaVersion}
.*-\(1.*\)/
\\
1/
"
|
sed -e
"
s/b/.0./
"
`
baseVersion=
`
echo
$bcVersion
|
sed -e
"
s/[^.]*.\([0-9]*\).*/
\\
1/
"
`
bcMaxVersion=
"
`
expr
"
${baseVersion}
"
"
+
"
"
1
"
`
"
if
[
"
`
echo
$bcVersion
|
fgrep b
`
"
=
"
$bcVersion
"
]
then
bcVersion=
`
echo
$bcVersion
|
sed -e
"
s/50b/49./
"
`
fi
if
`
echo
$jarFile
|
fgrep bcprov
>
/dev/null
`
then
cat
>
/tmp/bnd.props
<<
%
Bundle-Version:
$bcVersion
Bundle-Name:
$name
Bundle-SymbolicName:
$name
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.bouncycastle.*;version=
$bcVersion
Import-Package: *;resolution:=optional
%
else
cat
>
/tmp/bnd.props
<<
%
Bundle-Version:
$bcVersion
Bundle-Name:
$name
Bundle-SymbolicName:
$name
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.bouncycastle.*;version=
$bcVersion
Import-Package: org.bouncycastle.*;version="[
${bcVersion}
,1.
${bcMaxVersion}
)",*;resolution:=optional
%
fi
java -jar
$BND_HOME
/biz.aQute.bnd-2.2.0.jar wrap --properties /tmp/bnd.props
$jarFile
mv
$base
.jar
$jarFile
done
Back
|
FazBrowse Home
|
New Git URL