Sample Header Ad - 728x90

Passing variables and functions through fakeroot

1 vote
2 answers
684 views
I want to use fakeroot for a project, but the project has lots of functions and variables that I need to pass through to fakeroot.
#!/bin/bash
myVar="foo"

function testFunction() {
    echo "$myVar"
}

fakeroot -- bash -c testFunction
but it doesn't run testFunction or echo out myVar
Asked by Plasma (131 rep)
Jul 11, 2021, 01:49 PM
Last activity: Jul 25, 2021, 02:04 PM