media/kiss_fft/update.sh

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rwxr-xr-x

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 # Usage: sh update.sh <upstream_src_directory>
michael@0 2 set -e
michael@0 3
michael@0 4 if [ ! -d "$1" ]; then
michael@0 5 echo "Usage: ./update.sh /path/to/kiss_fft" > 2
michael@0 6 exit 1
michael@0 7 fi
michael@0 8
michael@0 9 FILES="CHANGELOG \
michael@0 10 COPYING \
michael@0 11 README \
michael@0 12 README.simd \
michael@0 13 _kiss_fft_guts.h \
michael@0 14 kiss_fft.c \
michael@0 15 kiss_fft.h \
michael@0 16 tools/kiss_fftr.c \
michael@0 17 tools/kiss_fftr.h"
michael@0 18
michael@0 19 for file in $FILES; do
michael@0 20 cp "$1/$file" .
michael@0 21 done
michael@0 22
michael@0 23 if [ -d "$1/.hg" ]; then
michael@0 24 rev=$(cd "$1" && hg log --template='{node}' -r `hg identify -i`)
michael@0 25 fi
michael@0 26
michael@0 27 if [ -n "$rev" ]; then
michael@0 28 version=$rev
michael@0 29 sed -i.bak -e "/The hg revision ID used was/ s/[0-9a-f]\{40\}\./$version./" README_MOZILLA
michael@0 30 rm README_MOZILLA.bak
michael@0 31 else
michael@0 32 echo "Remember to update README_MOZILLA with the version details."
michael@0 33 fi
michael@0 34

mercurial