diff --git a/bin/upnp-discover b/bin/upnp-discover index 14cb075..27a9c73 100755 --- a/bin/upnp-discover +++ b/bin/upnp-discover @@ -8,7 +8,14 @@ // Licensed under GNU GPL v3 or later. // -require_once __DIR__."/../vendor/autoload.php"; +foreach ([ + __DIR__."/../../autoload.php", + __DIR__."/../vendor/autoload.php" +] as $autoload) { + if (file_exists($autoload)) { + require_once $autoload; break; + } +} use NoccyLabs\UPnP\SSDP\Device; use NoccyLabs\UPnP\SSDP\Discovery;