~ubuntu-branches/ubuntu/precise/folks/precise-201306070638

« back to all changes in this revision

Viewing changes to tests/tools/tracker.sh

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2011-10-13 21:02:50 UTC
  • mfrom: (4.2.5 experimental)
  • mto: (4.2.6 experimental)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20111013210250-pgwuxw7z1cunhhhx
Tags: 0.6.3.2-2
* debian/rules: Call dh_strip for folks-tools package
* debian/gbp.conf: Switch to unstable branch
* debian/control:
  - Add libncurses5-dev build-dependency
  - Fix duplicate description
* debian/watch: Switch to .xz tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Helper functions to start your own Tracker instance. This depends
 
3
# on you having your own D-Bus session bus started (first).
 
4
#
 
5
#
 
6
# Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
 
7
#
 
8
# Copying and distribution of this file, with or without modification,
 
9
# are permitted in any medium without royalty provided the copyright
 
10
# notice and this notice are preserved.
 
11
 
 
12
tracker_tmpdir=$(mktemp -d)
 
13
 
 
14
tracker_init_settings () {
 
15
    export XDG_DATA_HOME=$tracker_tmpdir/.local
 
16
    export XDG_CACHE_HOME=$tracker_tmpdir/.cache
 
17
    export XDG_CONFIG_HOME=$tracker_tmpdir/.config
 
18
}
 
19
 
 
20
# This should be called on INT TERM and EXIT
 
21
tracker_cleanup () {
 
22
    rm -rf $tracker_tmpdir
 
23
    rm -rf $tracker_tmpdir
 
24
}
 
25
 
 
26
tracker_start () {
 
27
    tracker-control -rs > /dev/null 2>&1
 
28
}
 
29
 
 
30
tracker_stop () {
 
31
    tracker_cleanup
 
32
    tracker-control -r > /dev/null 2>&1
 
33
}
 
34