Skip to content

Commit

Permalink
Fixes so things actually run.
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
dobey committed Aug 18, 2018
1 parent b210311 commit ae11256
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
8 changes: 5 additions & 3 deletions diogenes-ng/diogenes-ng
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2018 Rodney Dawes
#
Expand All @@ -25,7 +25,9 @@ function cleanup_on_exit {
trap cleanup_on_exit EXIT

# Start the server and grab the URL
DIOGENES_URL=$(${DG_PERL_DIR}/diogenes-server.pl | grep "^http")
${DG_PERL_DIR}/diogenes-server.pl >/dev/null &
DIOGENES_PORT=$(grep ^port ${XDG_RUNTIME_DIR}/diogenes.run|cut -d' ' -f2)
DIOGENES_URL="http://127.0.0.1:${DIOGENES_PORT}/"

# Load the app
exec qmlscnee "${DIOGENES_URL}" ${DG_DIR}/app/diogenes-ng.qml
exec qmlscene "${DIOGENES_URL}" ${DG_DIR}/app/diogenes-ng.qml
11 changes: 8 additions & 3 deletions diogenes-ng/perl/Diogenes/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,16 @@ sub get_user_config_dir_base
}
elsif ($OS eq 'unix')
{
if ($ENV{XDG_CONFIG_HOME})
my $config_home = $ENV{XDG_CONFIG_HOME};
if ($config_home)
{
return "$ENV{XDG_CONFIG_HOME}/diogenes-ng/";
if (! -d $config_home)
{
mkdir($config_home);
}
return "$config_home/diogenes-ng/";
}
else { warn "Could not find user profile dir! \n" }
print "$ENV{HOME}/.config/diogenes-ng/";
}
elsif ($OS eq 'mac')
{
Expand Down
2 changes: 1 addition & 1 deletion diogenes-ng/perl/diogenes-server-kill.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


use Diogenes::Base;
my $runtime_dir = $ENV{XDG_RUNTIME_DIR};
my $runtime_dir = $ENV{'XDG_RUNTIME_DIR'};
my $lock_file = File::Spec->catfile($runtime_dir, 'diogenes-ng.run');

print "Running diogenes-server-kill.pl\n";
Expand Down
2 changes: 1 addition & 1 deletion diogenes-ng/perl/diogenes-server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ package Diogenes_Daemon;
use Getopt::Std;
use vars qw/$opt_d $opt_p $opt_h $opt_H $opt_l $opt_m $opt_D $opt_P/;

my $runtime_dir = $ENV{XDG_RUNTIME_DIR};
my $runtime_dir = $ENV{'XDG_RUNTIME_DIR'};
my $lock_file = File::Spec->catfile($runtime_dir, 'diogenes.run');

# Mozilla wants this: it ignores css files of type text/plain.
Expand Down

0 comments on commit ae11256

Please sign in to comment.