From c7e110801c5de63d570b857f4bb3784f1ca5fbb3 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 25 Oct 2009 09:58:50 +0100 Subject: Replaced util/init.pl with a Makefile I'm planning to add some more stuff to this makefile later, like starting/stopping Multi and performing updates. --- util/init.pl | 70 ------------------------------------------------------------ 1 file changed, 70 deletions(-) delete mode 100755 util/init.pl (limited to 'util') diff --git a/util/init.pl b/util/init.pl deleted file mode 100755 index ac533174..00000000 --- a/util/init.pl +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl - - -# This script should be run after you've somehow managed to fetch -# all the versioned files from the git repo. - - -print "Initializing the files and directories needed to run VNDB...\n"; - - -# determine our root directory -use Cwd 'abs_path'; -our $ROOT; -BEGIN { - ($ROOT = abs_path $0) =~ s{/util/init\.pl$}{}; -} - - -print " Using project root: $ROOT\n"; -print "\n"; - - - -print "Creating directory structures...\n"; -for my $d (qw| cv st sf |) { - print " /static/$d\n"; - mkdir "$ROOT/static/$d" or die "mkdir '$ROOT/static/$d': $!\n"; - for my $i (0..99) { - my $n = sprintf '%s/static/%s/%02d', $ROOT, $d, $i; - mkdir $n or die "mkdir '$n': $!\n"; - chmod 0777, $n or die "chmod 777 '$n': $!\n"; - } -} -print "\n"; - - -print "Creating /www\n"; -print " You can use this directory to store all files you want to\n"; -print " be available from the main domain. A favicon.ico for example.\n"; -mkdir "$ROOT/www" or die $!; -print "\n"; - - -print "Writing robots.txt in /static and /www\n"; -print " You probably don't want your personal copy of VNDB to end up\n"; -print " in the google results, so I'll install a default robots.txt\n"; -print " for you. You're free to modify them as you wish.\n"; -for ('static/robots.txt', 'www/robots.txt') { - print " $_ exists, skipping...\n", next if -f "$ROOT/$_"; - open my $F, '>', "$ROOT/$_" or die "$_: $!\n"; - print $F "User-agent: *\nDisallow: /\n"; - close $F; -} -print "\n"; - - -if(!-f "$ROOT/data/config.pl") { - # TODO: create a template config file - print "No custom config file found, please write one!\n"; -} -print "\n"; - - -print "Everything is initialized! Now make sure to configure your\n"; -print "webserver and to initialize a postgresql database (using\n"; -print "dump.sql)\n"; - - - - -- cgit v1.2.3