summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-26 12:58:54 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-26 12:58:54 +0000
commita9e444bb39f5c356b66ef247b4539937daa25503 (patch)
treef7e97b27cf6021aa52677e883338d0dc2763ea3c /util
parenta479c250b2e2cba340a2f52b68dea26e9730df43 (diff)
And again cd'ed in the wrong directory...1.14
git-svn-id: svn://vndb.org/vndb@7 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'util')
-rw-r--r--util/updates/update_1.14.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/updates/update_1.14.pl b/util/updates/update_1.14.pl
index af9840c5..cd45b0fa 100644
--- a/util/updates/update_1.14.pl
+++ b/util/updates/update_1.14.pl
@@ -10,6 +10,7 @@ use DBI;
# /static has been created
# /www/files has already been moved
chdir '/www/vndb';
+require 'lib/global.pl';
# run the usual SQL update script
@@ -24,7 +25,7 @@ mkdir 'static/cv';
mkdir 'static/rg';
chmod 0755, qw|data/rg static/cv static/rg|;
-for (0..49) {
+for (0..99) {
$_ = sprintf "%02d",$_;
mkdir "data/rg/$_";
mkdir "static/rg/$_";
@@ -50,7 +51,7 @@ for (@{$q->fetchall_arrayref([])}) {
my($id) = $q->fetchrow_array();
rename
sprintf('www/img/%s/%s.jpg', substr($_->[0],0,1), $_->[0]),
- sprintf('static/cv/%02d/%d.jpg', $id%50, $id);
+ sprintf('static/cv/%02d/%d.jpg', $id%100, $id);
$sql->do('UPDATE vn_rev SET image_id = ? WHERE image = DECODE(\''.$_->[0].'\', \'hex\')', undef, $id);
}
$sql->do('ALTER TABLE vn_rev DROP COLUMN image');