Question

In the old Scratchbox one could do something like:

if [ -f /targets/links/scratchbox.config ]; then 
    echo "here goes my sbox-dependent stuff" 
fi

but what about Scratchbox2, is there a way to find out this?

Was it helpful?

Solution

How about test the environment variable 'LD_PRELOAD'

if [[ $LD_PRELOAD =~ "sb2" ]]; then 
    true # is running under sb2
fi
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top