3 # https://github.com/rogerwang/node-webkit/issues/136
4 # https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0
6 # Though that page would be more accurately titled "apparently even
7 # Intel, Google, and every commercial distribution can't be bothered
8 # to maintain trivial compatibility on desktop Linux."
10 SELF
=$
(readlink
-f "$0")
11 NWDIR
=$
(dirname "$SELF")/nw
12 NWBIN
=$
(command -v "$NWDIR/nw" nw |
head -n 1)
13 PACKAGE
="$NWDIR/package.nw"
15 if [ ! -x "$NWBIN" ]; then
16 echo "node-webkit (nw) executable could not be found." >&2
20 "$NWBIN" "$@" "$PACKAGE"
21 if [ "$?" = "127" -a -w "$NWBIN" ]; then
22 echo "Applying libudev.so.1 hack." >&2
23 sed -i 's/udev\.so\.0/udev.so.1/g' "$NWBIN"
24 "$NWBIN" "$@" "$PACKAGE"