summaryrefslogtreecommitdiff
path: root/bucky2/bin/move-file
blob: 7c9e6037d043cd36ffd3afec327644e29911ca10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
use strict;
use lib "../lib";
use Bucky;

if (scalar(@ARGV) < 2) {
  print "usage: move-file id thread\n";
  exit(1);
}

my $bucky = new Bucky;
$bucky->db->update_by_id('file', {
  "id" => $ARGV[0],
  "record" => {
    "thread" => $ARGV[1]
  }
});