From c3150cb2fe6ff53c4d12fb967b27c73e15f64f28 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 23 Dec 2013 18:47:46 -0600 Subject: move comment and file scripts --- bucky2/bin/move-comment | 18 ++++++++++++++++++ bucky2/bin/move-file | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 bucky2/bin/move-comment create mode 100755 bucky2/bin/move-file (limited to 'bucky2') diff --git a/bucky2/bin/move-comment b/bucky2/bin/move-comment new file mode 100755 index 0000000..29c59ef --- /dev/null +++ b/bucky2/bin/move-comment @@ -0,0 +1,18 @@ +#!/usr/bin/perl +use strict; +use lib "../lib"; +use Bucky; + +if (scalar(@ARGV) < 2) { + print "usage: move-comment id thread\n"; + exit(1); +} + +my $bucky = new Bucky; +$bucky->db->update_by_id('comment', { + "id" => $ARGV[0], + "record" => { + "thread" => $ARGV[1] + } +}); + diff --git a/bucky2/bin/move-file b/bucky2/bin/move-file new file mode 100755 index 0000000..7c9e603 --- /dev/null +++ b/bucky2/bin/move-file @@ -0,0 +1,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] + } +}); + -- cgit v1.2.3-70-g09d2