blob: bab1184371e084a7cd8c8d47e719c418be875ebe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/sh -e
./simple
oldInterpreter=$(../src/patchelf --print-interpreter ./simple)
echo "current interpreter is $oldInterpreter"
rm -rf scratch
mkdir -p scratch
cp simple scratch/
../src/patchelf --interpreter $(pwd)/scratch/i scratch/simple
echo "running with missing interpreter..."
if scratch/simple; then
echo "simple works, but it shouldn't"
exit 1
fi
echo "running with new interpreter..."
ln -s "$oldInterpreter" scratch/i
scratch/simple
|