account for freebsd path for gtkmozembed
This commit is contained in:
parent
a29c735acd
commit
5828ee03e9
|
@ -46,21 +46,31 @@ import deluge._dbus as dbus
|
||||||
import deluge.interface
|
import deluge.interface
|
||||||
import deluge.pref
|
import deluge.pref
|
||||||
|
|
||||||
print "checking for ubuntu..."
|
|
||||||
if not deluge.common.windows_check():
|
|
||||||
if os.WEXITSTATUS(os.system('grep -iq "Ubuntu" /etc/issue')) == 0:
|
|
||||||
print "found and fixing ubuntu"
|
|
||||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
|
||||||
os.environ["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
|
||||||
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
|
||||||
os.system("/usr/bin/deluge")
|
|
||||||
raise SystemExit
|
|
||||||
|
|
||||||
parser = OptionParser(usage="%prog [options] [torrents to add]",
|
parser = OptionParser(usage="%prog [options] [torrents to add]",
|
||||||
version=deluge.common.PROGRAM_VERSION)
|
version=deluge.common.PROGRAM_VERSION)
|
||||||
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
print "checking for ubuntu..."
|
||||||
|
print options
|
||||||
|
print args
|
||||||
|
if not deluge.common.windows_check():
|
||||||
|
import platform
|
||||||
|
if platform.system() == "Linux": # Add this, FreeBSD and other OSs than Linux do not have /etc/issue.
|
||||||
|
if os.WEXITSTATUS(os.system('grep -iq "Ubuntu" /etc/issue')) == 0:
|
||||||
|
print "found and fixing ubuntu"
|
||||||
|
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
||||||
|
os.environ["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
||||||
|
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
||||||
|
os.system("/usr/bin/deluge %s %s" %(options, args))
|
||||||
|
raise SystemExit
|
||||||
|
elif platform.system() == "FreeBSD":
|
||||||
|
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/local/lib/firefox":
|
||||||
|
os.environ["MOZILLA_FIVE_HOME"] = "/usr/local/lib/firefox"
|
||||||
|
os.environ["LD_LIBRARY_PATH"] = "/usr/local/lib/firefox"
|
||||||
|
os.system("/usr/local/bin/deluge %s %s" %(options, args))
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
if (options.config != None):
|
if (options.config != None):
|
||||||
deluge.common.CONFIG_DIR = options.config
|
deluge.common.CONFIG_DIR = options.config
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue