~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to python/starch/test/TR_extract_and_remove.sh

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
. ../../dttools/src/test_runner.common.sh
 
4
 
 
5
sfxfile=extract_and_remove.sfx
 
6
tarfile=starch.tar.gz
 
7
 
 
8
prepare()
 
9
{
 
10
    cd ..; tar czvf $tarfile starch; cd -; mv ../$tarfile .
 
11
    exit 0
 
12
}
 
13
 
 
14
run()
 
15
{
 
16
    ${CCTOOLS_PYTHON} ./starch.py -v -x tar -x rm -c 'for f in $@; do if ! tar xvf $f; then exit 1; fi ; done; rm $@' $sfxfile
 
17
    exec $sfxfile $tarfile
 
18
}
 
19
 
 
20
clean()
 
21
{
 
22
    rm -f $sfxfile $tarfile 
 
23
    rm -rf $(basename $tarfile .tar.gz)
 
24
    exit 0
 
25
}
 
26
 
 
27
dispatch $@