File: trim.sh

package info (click to toggle)
bouncycastle 1.80-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 70,892 kB
  • sloc: java: 968,332; sh: 3,509; xml: 2,376; makefile: 22
file content (18 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# script to remove JDK 1.5+ generics from a file

(
ed $1 <<%%
g/<[<]*[A-Z?][^>@]*[a-zA-Z0-9][>]*>/s///g
g/<[A-Z]>/s///g
g/<[a-z][a-z]*\\[\\]>/s///g
g/List>/s//List/g
g/<List/s///g
g/<AlgorithmIdentifier, byte\\[\\]>/s///g
g/<CacheIndex, byte\\[\\]>/s///g
g/ERSData\\.\\.\\./s//ERSData[]/g
g/Collections.singletonList(dataObject)/s//new ArrayList(); dataObjects.add(dataObject)/g
w
q
%%
) > /dev/null 2>&1