~ubuntu-branches/ubuntu/hoary/mime-support/hoary

« back to all changes in this revision

Viewing changes to debian-view

  • Committer: Bazaar Package Importer
  • Author(s): Brian White
  • Date: 2004-03-03 07:47:41 UTC
  • Revision ID: james.westby@ubuntu.com-20040303074741-1b96w5g6vqqafdxs
Tags: 3.26-1
added more mime types (closes: #235663, #225222)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
dpkg="dpkg"
 
4
 
 
5
echo "Info for debian package '$1':"
 
6
dpkg-deb --info $1
 
7
 
 
8
echo     " "
 
9
echo     "Do you wish to:"
 
10
echo     " - I)nstall the package now,"
 
11
echo     " - S)ave it to a file, or"
 
12
echo     " - Q)uit now"
 
13
echo -n "Your choice (I/S/Q)? "
 
14
read choice
 
15
 
 
16
case "$choice" in
 
17
 
 
18
  [iI])
 
19
    if [ `id --user` -ne 0 ]
 
20
        then
 
21
        echo    "Installation of Debian packages needs to be done as root."
 
22
        echo -n "Enter command used to become root (eg. "sudo"): "
 
23
        read sudo
 
24
        dpkg="$sudo $dpkg"
 
25
    fi
 
26
 
 
27
    echo " "
 
28
    echo "Installing package..."
 
29
    eval "$dpkg --install '$1'"
 
30
    ;;
 
31
 
 
32
  [sS])
 
33
    echo -n "Save as? "
 
34
    read filename
 
35
    echo "Saving '$filename'..."
 
36
    cat "$1" >$filename
 
37
    ;;
 
38
 
 
39
esac
 
40
 
 
41
echo " "
 
42
echo -n "Done.  Press <return> to continue: "
 
43
read dummy
 
44
echo " "