~mimose/+junk/hplip-3.16.11

« back to all changes in this revision

Viewing changes to debian/local/scripts/hp-plugin-ubuntu

  • Committer: guoyalong
  • Date: 2017-09-20 10:13:05 UTC
  • Revision ID: guoyalong@kylinos.cn-20170920101305-82zaolzpv1qghz29
Modified debian/control & debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
if [ -z $DISPLAY ]; then
 
3
    sudo -p \
 
4
        "
 
5
HP Printer Driver Plug-in Installetion
 
6
--------------------------------------
 
7
 
 
8
This program will install the proprietary plug-in for HP's printer
 
9
driver framework HPLIP into your system. This requires administrator
 
10
access. Please enter your password.
 
11
User: %u
 
12
Password: " \
 
13
    hp-plugin -i
 
14
else
 
15
    if python -c 'import PyQt4.QtGui' 2>/dev/null && which hp-toolbox >/dev/null 2>/dev/null; then
 
16
        pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY hp-plugin -u >/dev/null 2>&1
 
17
        exit 0
 
18
    else
 
19
        pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xterm -T 'HP Printer Driver Plug-in Installation' -sb -rightbar -hold -e hp-plugin -i >/dev/null 2>&1 &
 
20
        exit 0
 
21
    fi
 
22
fi