diff options
author | papajoker | 2015-10-02 23:01:21 +0200 |
---|---|---|
committer | papajoker | 2015-10-02 23:01:21 +0200 |
commit | 285b079acc30270a223279f27b6e64ae7c0f1702 (patch) | |
tree | e903f9bdb956e69b37ab6f3f1bdaefe9116547bd | |
parent | 6627f7044a410feaf7ff5d694078d481dc864140 (diff) | |
download | aur-285b079acc30270a223279f27b6e64ae7c0f1702.tar.gz |
add su command
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rwxr-xr-x | pacman-diffs | 10 |
3 files changed, 13 insertions, 3 deletions
@@ -8,6 +8,8 @@ pkgbase = pacman-diffs depends = diffutils optdepends = diffuse: graphical editor[community] optdepends = kompare: kde editor [extra] + optdepends = gksu: gnome gui for su + optdepends = kdesu: kde gui for su source = pacman-diffs md5sums = SKIP @@ -7,7 +7,9 @@ arch=('any') license=('GPL') depends=('findutils' 'diffutils') optdepends=('diffuse: graphical editor[community]' - 'kompare: kde editor [extra]') + 'kompare: kde editor [extra]' + 'gksu: gnome gui for su' + 'kdesu: kde gui for su') source=("pacman-diffs") md5sums=('SKIP') diff --git a/pacman-diffs b/pacman-diffs index a5ab4d5e5563..2596f1dec11e 100755 --- a/pacman-diffs +++ b/pacman-diffs @@ -75,10 +75,16 @@ find '/etc' -name "*.$EXT" -mtime -$AGE -type f 2> /dev/null | while read file ; fi if [ "$edit" == "$fname" ]; then + kdesu='' + if [ -f '/usr/bin/kdesu' ]; then + kdesu='kdesu' + else + [ -f '/usr/bin/gksu' ] && kdesu='gksu' + fi if [ -f '/usr/bin/diffuse' ]; then - /usr/bin/diffuse $ofile $file & + $kdesu /usr/bin/diffuse $ofile $file & else - [ -f '/usr/bin/kompare' ] && /usr/bin/kompare $ofile $file & + [ -f '/usr/bin/kompare' ] && $kdesu /usr/bin/kompare $ofile $file & fi fi |