summary refs log tree commit diff
path: root/ripple/tools/fakefakeroot
diff options
context:
space:
mode:
Diffstat (limited to 'ripple/tools/fakefakeroot')
-rw-r--r--ripple/tools/fakefakeroot/.gitignore5
-rw-r--r--ripple/tools/fakefakeroot/PKGBUILD17
-rwxr-xr-xripple/tools/fakefakeroot/fakefakeroot.sh17
3 files changed, 39 insertions, 0 deletions
diff --git a/ripple/tools/fakefakeroot/.gitignore b/ripple/tools/fakefakeroot/.gitignore
new file mode 100644
index 0000000..b91c0cb
--- /dev/null
+++ b/ripple/tools/fakefakeroot/.gitignore
@@ -0,0 +1,5 @@
+# SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
+# SPDX-License-Identifier: OSL-3.0
+/*.pkg.tar.*
+/src/
+/pkg/
diff --git a/ripple/tools/fakefakeroot/PKGBUILD b/ripple/tools/fakefakeroot/PKGBUILD
new file mode 100644
index 0000000..22cdb41
--- /dev/null
+++ b/ripple/tools/fakefakeroot/PKGBUILD
@@ -0,0 +1,17 @@
+# SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
+# SPDX-License-Identifier: OSL-3.0
+pkgname=fakefakeroot
+pkgver=0
+pkgrel=0
+pkgdesc='fakeroot shim'
+arch=('any')
+license=('OSL-3.0')
+depends=('bash')
+provides=('fakeroot')
+conflicts=('fakeroot')
+source=('./fakefakeroot.sh')
+b2sums=('SKIP')
+
+package() {
+	install -Dm 0755 fakefakeroot.sh $pkgdir/usr/bin/fakeroot
+}
diff --git a/ripple/tools/fakefakeroot/fakefakeroot.sh b/ripple/tools/fakefakeroot/fakefakeroot.sh
new file mode 100755
index 0000000..0f6ca7c
--- /dev/null
+++ b/ripple/tools/fakefakeroot/fakefakeroot.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+# SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
+# SPDX-License-Identifier: OSL-3.0
+
+if [ "$*" = "-v" ]; then
+    echo fakefakeroot
+    exit 0
+fi
+
+if [ "$1" != "--" ]; then
+    echo "usage: $0 -- PROGRAM [ARG]..." >&2
+    exit 255
+fi
+
+export FAKEROOTKEY="double-fake-root"
+
+shift; exec "$@"