diff options
author | Filippo Squillace | 2017-04-23 23:38:39 +0100 |
---|---|---|
committer | Filippo Squillace | 2017-04-23 23:41:49 +0100 |
commit | 0acee5ce69d9b601c2a892fccd3f7a417307392d (patch) | |
tree | 3928f9d6b1ba00496ec36b09f4db07fcc3b2da7d | |
download | aur-sudo-fake.tar.gz |
First commit for sudo-fake!
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..beb5425ad6d1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,11 @@ +pkgbase = sudo-fake + pkgdesc = Simple script that bypasses sudo and execute the actual command. Useful for fakeroot environments. + pkgver = 0.1.0 + pkgrel = 1 + arch = any + license = GPL + provides = sudo + conflicts = sudo + +pkgname = sudo-fake + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..99fa18bceee1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Filippo Squillace <feel dot sqoox at gmail dot com> +# More details on how to change this file: +# https://wiki.archlinux.org/index.php/PKGBUILD +# https://wiki.archlinux.org/index.php/Creating_packages +# https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages + +pkgname=sudo-fake +pkgver=0.1.0 +pkgrel=1 +pkgdesc="Simple script that bypasses sudo and execute the actual command. Useful for fakeroot environments." +arch=('any') +url="" +license=('GPL') +groups=() +depends=() +makedepends=() +provides=('sudo') +conflicts=('sudo') +backup=() +options=() +#install= +source=() +md5sums=() +noextract=() + +package() { + install -d -m 755 "${pkgdir}/usr/bin/" + cat <<EOF > "${pkgdir}/usr/bin/sudo" +#!/bin/bash +for opt in "\$@" +do + case "\$1" in + --) shift ; break ;; + -*) shift ;; + *) break ;; + esac +done + +[[ -z "\${@}" ]] || "\${@}" +EOF + + chmod 755 "${pkgdir}/usr/bin/sudo" +} + +# vim:set ts=2 sw=2 et: |