annotate deploy/linux/fix-lintian-bits.sh @ 726:720595a8fa10

Avoid using directory name that clashes with intended executable name
author Chris Cannam
date Mon, 17 Dec 2018 09:31:38 +0000
parents 21e4df9865af
children cd4617b18960
rev   line source
Chris@700 1 #!/bin/bash
Chris@700 2
Chris@700 3 dir=$1
Chris@700 4
Chris@700 5 [ -d "$dir" ] || exit 1
Chris@700 6
Chris@700 7 set -eu
Chris@700 8
Chris@700 9 strip "$dir"/usr/bin/*
Chris@700 10
Chris@700 11 sz=`du -sx --exclude DEBIAN "$dir" | awk '{ print $1; }'`
Chris@700 12 perl -i -p -e "s/Installed-Size: .*/Installed-Size: $sz/" "$dir"/DEBIAN/control
Chris@700 13
Chris@700 14 find "$dir" -name \*~ -exec rm \{\} \;
Chris@700 15
Chris@700 16 chown -R root.root "$dir"/*
Chris@700 17
Chris@700 18 chmod -R g-w "$dir"/*