account for freebsd path for gtkmozembed
This commit is contained in:
parent
a29c735acd
commit
5828ee03e9
|
@ -46,20 +46,30 @@ import deluge._dbus as dbus
|
||||||
import deluge.interface
|
import deluge.interface
|
||||||
import deluge.pref
|
import deluge.pref
|
||||||
|
|
||||||
|
parser = OptionParser(usage="%prog [options] [torrents to add]",
|
||||||
|
version=deluge.common.PROGRAM_VERSION)
|
||||||
|
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
print "checking for ubuntu..."
|
print "checking for ubuntu..."
|
||||||
|
print options
|
||||||
|
print args
|
||||||
if not deluge.common.windows_check():
|
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:
|
if os.WEXITSTATUS(os.system('grep -iq "Ubuntu" /etc/issue')) == 0:
|
||||||
print "found and fixing ubuntu"
|
print "found and fixing ubuntu"
|
||||||
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
if os.environ.get("MOZILLA_FIVE_HOME") != "/usr/lib/firefox":
|
||||||
os.environ["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
os.environ["MOZILLA_FIVE_HOME"] = "/usr/lib/firefox"
|
||||||
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
os.environ["LD_LIBRARY_PATH"] = "/usr/lib/firefox"
|
||||||
os.system("/usr/bin/deluge")
|
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
|
raise SystemExit
|
||||||
|
|
||||||
parser = OptionParser(usage="%prog [options] [torrents to add]",
|
|
||||||
version=deluge.common.PROGRAM_VERSION)
|
|
||||||
parser.add_option("-c", "--config", dest="config", help="Sets the configuration path")
|
|
||||||
(options, args) = parser.parse_args()
|
|
||||||
|
|
||||||
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