Permalink
Browse files

Save .bee files in the directory pointed to be . This puts them in a …

…stable place rather than the CSD where the script is run from, and makes it easier to script their modification or deletion.
  • Loading branch information...
pmyteh committed Jan 17, 2014
1 parent 6005b1b commit f83107e9a184f78e9ebe9f47880fe2c312e8ae72
Showing with 6 additions and 1 deletion.
  1. +1 −1 beeminder.pl
  2. +5 −0 script/ttlogmerge.pl
View
@@ -19,7 +19,7 @@
$usrslug = shift; # like alice/weight
$usrslug =~ /^(?:.*?(?:\.\/)?data\/)?([^\+\/\.]*)[\+\/]([^\.]*)/;
($usr, $slug) = ($1, $2);
-$beef = "$usr+$slug.bee"; # beef = bee file (cache of data on bmndr)
+$beef = "${path}$usr+$slug.bee"; # beef = bee file (cache of data on bmndr)
if(defined(@beeminder)) { # for backward compatibility
print "Deprecation warning: Get your settings file in line!\n";
View
@@ -56,6 +56,11 @@ sub parse_timestamp
open(my $f2, "<", $ARGV[1]) or die;
open(my $fo, ">", $ARGV[2]) or die;
+# TODO: Should open the config file, and if we can, delete the .bee files
+# associated with it. For extra credit, we should only remove the ones
+# which are actually affected by the merge, possibly by flagging during
+# the merge step which files are dirty and deleting them afterward.
+
# Read initial lines from files
my $l1 = <$f1>;
my $l2 = <$f2>;

0 comments on commit f83107e

Please sign in to comment.