~gothicx/apport/fix_sentence_resume

« back to all changes in this revision

Viewing changes to debian/local/ubuntu-bug

  • Committer: Martin Pitt
  • Date: 2009-09-02 12:24:29 UTC
  • Revision ID: martin.pitt@canonical.com-20090902122429-q3xjxwjb2z3el7cr
ubuntu-bug: Fix handling of .crash file arguments, thanks to Marco
Rodrigues for pointing this out! (LP: #422881)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    args="-f -P $1"
19
19
elif [ "${1%.crash}" != "$1" ]; then
20
20
    # crash file
21
 
    args="-c '$1'"
 
21
    args="-c"
 
22
    farg="$1"
22
23
elif expr "$1" : ".*/.*" >/dev/null; then
23
24
    # program path
24
25
    output=$(dpkg-query --search "$1" || echo '')
39
40
# check for X
40
41
if [ -z "$DISPLAY" ]; then
41
42
    if [ -x /usr/bin/apport-cli ]; then
42
 
        /usr/bin/apport-cli $args
 
43
        /usr/bin/apport-cli $args "$farg"
43
44
    else
44
45
        echo "\$DISPLAY is not set. You need apport-cli to make this program work." >&2
45
46
        exit 1
47
48
# do we have a running Gnome/KDE session
48
49
elif pgrep -u `id -u` -x gnome-session >/dev/null && \
49
50
    [ -x /usr/share/apport/apport-gtk ]; then
50
 
    /usr/share/apport/apport-gtk $args
 
51
    /usr/share/apport/apport-gtk $args "$farg"
51
52
elif pgrep -u `id -u` -x ksmserver >/dev/null && \
52
53
    [ -x /usr/share/apport/apport-qt ]; then
53
 
        /usr/share/apport/apport-qt $args
 
54
        /usr/share/apport/apport-qt $args "$farg"
54
55
# fall back to calling whichever is available
55
56
elif [ -x /usr/share/apport/apport-gtk ]; then
56
 
    /usr/share/apport/apport-gtk $args
 
57
    /usr/share/apport/apport-gtk $args "$farg"
57
58
elif [ -x /usr/share/apport/apport-kde ]; then
58
 
    /usr/share/apport/apport-kde $args
 
59
    /usr/share/apport/apport-kde $args "$farg"
59
60
elif [ -x /usr/bin/apport-cli ]; then
60
61
    if [ -z "$TERM" ]; then
61
 
        x-terminal-emulator -e /usr/bin/apport-cli $args
 
62
        x-terminal-emulator -e /usr/bin/apport-cli $args "$farg"
62
63
    else
63
 
        /usr/bin/apport-cli $args
 
64
        /usr/bin/apport-cli $args "$farg"
64
65
    fi
65
66
else
66
67
    echo "Neither apport-gtk, apport-qt or apport-cli is installed. Install either to make this program work." >&2