Die tabs die
This commit is contained in:
parent
2d498a3c1c
commit
83758d2b26
@ -9,26 +9,26 @@ findTarballs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canonicalizeJarManifest() {
|
canonicalizeJarManifest() {
|
||||||
local input=$1
|
local input=$1
|
||||||
# http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files
|
# http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files
|
||||||
(head -n 1 $input && tail -n +2 $input | sort | grep -v '^\s*$') > $input-tmp
|
(head -n 1 $input && tail -n +2 $input | sort | grep -v '^\s*$') > $input-tmp
|
||||||
mv $input-tmp $input
|
mv $input-tmp $input
|
||||||
}
|
}
|
||||||
|
|
||||||
# Post-process a jar file to contain canonical timestamps and metadata ordering
|
# Post-process a jar file to contain canonical timestamps and metadata ordering
|
||||||
canonicalizeJar() {
|
canonicalizeJar() {
|
||||||
local input=$1
|
local input=$1
|
||||||
local outer=$(pwd)
|
local outer=$(pwd)
|
||||||
unzip -qq $input -d $input-tmp
|
unzip -qq $input -d $input-tmp
|
||||||
canonicalizeJarManifest $input-tmp/META-INF/MANIFEST.MF
|
canonicalizeJarManifest $input-tmp/META-INF/MANIFEST.MF
|
||||||
# Set all timestamps to Jan 1 1980, which is the earliest date the zip format supports...
|
# Set all timestamps to Jan 1 1980, which is the earliest date the zip format supports...
|
||||||
find $input-tmp -exec touch -t 198001010000.00 {} +
|
find $input-tmp -exec touch -t 198001010000.00 {} +
|
||||||
rm $input
|
rm $input
|
||||||
pushd $input-tmp
|
pushd $input-tmp
|
||||||
zip -q -r -o -X $outer/tmp-out.jar . 2> /dev/null
|
zip -q -r -o -X $outer/tmp-out.jar . 2> /dev/null
|
||||||
popd
|
popd
|
||||||
rm -rf $input-tmp
|
rm -rf $input-tmp
|
||||||
mv $outer/tmp-out.jar $input
|
mv $outer/tmp-out.jar $input
|
||||||
}
|
}
|
||||||
|
|
||||||
propagateImageName() {
|
propagateImageName() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user