diff options
author | Steve Kondik <shade@chemlab.org> | 2010-08-22 00:08:06 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-08-22 00:08:06 -0400 |
commit | 47ce7ecc75665d130d6cf561f8ce7f64aad2f5d5 (patch) | |
tree | b03e516fc23e81c10e909240bd80e75ef5232d44 /tools | |
parent | 44226331a651e70d1bff857d98449e74ed40757e (diff) | |
download | vendor_replicant-47ce7ecc75665d130d6cf561f8ce7f64aad2f5d5.zip vendor_replicant-47ce7ecc75665d130d6cf561f8ce7f64aad2f5d5.tar.gz vendor_replicant-47ce7ecc75665d130d6cf561f8ce7f64aad2f5d5.tar.bz2 |
Use unique temporary directories in opticharger
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/opticharger | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/opticharger b/tools/opticharger index fd77f3c..9e1af13 100755 --- a/tools/opticharger +++ b/tools/opticharger @@ -21,6 +21,8 @@ set -e QUIET=1 QFLAG=-q BASE=`pwd` +TMPDIR=/tmp/opticharge-$$ + if [ "$APKCERTS" = "" ]; then APKCERTS=$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_PRODUCT-target_files-$TARGET_BUILD_VARIANT.$LOGNAME/META/apkcerts.txt @@ -87,10 +89,10 @@ then [ $QUIET ] || echo "Certificate: $CERT"; - [ -d /tmp/$NAME ] && rm -rf /tmp/$NAME - mkdir /tmp/$NAME - trap "rm -rf /tmp/$NAME; exit" INT TERM EXIT - cd /tmp/$NAME + [ -d $TMPDIR/$NAME ] && rm -rf $TMPDIR/$NAME + mkdir -p $TMPDIR/$NAME + trap "rm -rf $TMPDIR; exit" INT TERM EXIT + cd $TMPDIR/$NAME unzip -q $BASE/$1 for x in `find . -name "*.png" | grep -v "\.9.png$" | tr "\n" " "` do |