-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·30 lines (26 loc) · 870 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·30 lines (26 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
export MYAPP_WRAPPER="`readlink -f "$0"`"
HERE="`dirname "$MYAPP_WRAPPER"`"
# Always use our versions of ffmpeg libs.
# This also makes RPMs find the compatibly-named library symlinks.
if [[ -n "$LD_LIBRARY_PATH" ]]; then
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
else
LD_LIBRARY_PATH="$HERE:$HERE/lib"
fi
export LD_LIBRARY_PATH
# Create local symlink to libudev.so.1
if [ ! -e ./libudev.so.0 ]; then
udevDependent=`which udisks 2> /dev/null` # Ubuntu, Mint
if [ -z "$udevDependent" ]; then
udevDependent=`which systemd 2> /dev/null` # Fedora, SUSE
fi
if [ -z "$udevDependent" ]; then
udevDependent=`which findmnt` # Arch
fi
udevso=`ldd $udevDependent | grep libudev.so | awk '{print $3;}'`
if [ -e "$udevso" ]; then
ln -sf "$udevso" ./libudev.so.0
fi
fi
exec -a "$0" "$HERE/app" "$@"