view deploy/linux/fix-lintian-bits.sh @ 961:f3c1546c8a5c

Address #1214, layer import produces wrong layer type. We needed a more principled approach to making sure the format gets updated properly and the dialog elements are consistent (basically separating making the dialog elements consistent from subsequently updating the format). This change should provide that, though there may be gotchas still.
author Chris Cannam
date Tue, 12 May 2015 12:31:37 +0100
parents 129b679734d0
children 9b59deb4a854
line wrap: on
line source
#!/bin/bash

dir=$1

[ -d "$dir" ] || exit 1

strip "$dir"/usr/bin/*

sz=`du -sx --exclude DEBIAN "$dir" | awk '{ print $1; }'`
perl -i -p -e "s/Installed-Size: .*/Installed-Size: $sz/" "$dir"/DEBIAN/control

find "$dir" -name \*~ -exec rm \{\} \;

sudo chown -R root.root "$dir"/*

sudo chmod -R g-w "$dir"/*