Added wizard, for creating local Auto config directories.
This commit is contained in:
1 parent
25a0ec8081
commit
f19838091c
4 files changed
+60
-2
No files matched your search
@@ -13,9 +13,10 @@ the popular Auto IRC bot.
|
||||
|
||||
In this alpha8 release, we have added:
|
||||
|
||||
* A module to get information on a package in AUR.
|
||||
* A module to get information on a package in AUR (AUR).
|
||||
* Support for installs to custom locations.
|
||||
* Support for system-wide installs. (/usr or /usr/local)
|
||||
* The `wizard` utility, for creating local Auto config directories.
|
||||
|
||||
Bug fixes:
|
||||
|
||||
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env perl
|
||||
# bin/wizard - Wizard for creating local Auto configuration directories.
|
||||
# Copyright (C) 2010-2011 Xelhua Development Group, et al.
|
||||
# This program is free software; rights to this code are stated in doc/LICENSE.
|
||||
use 5.010_000;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd;
|
||||
use FindBin qw($Bin);
|
||||
use File::Copy;
|
||||
our $VERSION = 1.00;
|
||||
my $Bin = $Bin;
|
||||
|
||||
# Get current working directory.
|
||||
my $cwd = getcwd();
|
||||
|
||||
# One argument required.
|
||||
if (!defined $ARGV[0]) {
|
||||
say 'ERROR: Missing arguments.';
|
||||
say 'Usage: auto-wizard <directory>';
|
||||
exit;
|
||||
}
|
||||
|
||||
# Strip trailing slash.
|
||||
my $installdir = $ARGV[0];
|
||||
$installdir =~ s/\/$//xsm;
|
||||
|
||||
# Create missing directories.
|
||||
if (!-d "$cwd/$installdir") { mkdir "$cwd/$installdir" }
|
||||
if (!-d "$cwd/$installdir/etc") { mkdir "$cwd/$installdir/etc" }
|
||||
if (!-d "$cwd/$installdir/var") { mkdir "$cwd/$installdir/var" }
|
||||
|
||||
# Copy over example.conf.
|
||||
copy("$Bin/../lib/autobot/3.0.0/dist/example.conf", "$cwd/$installdir/etc/example.conf");
|
||||
chmod 0644, "$cwd/$installdir/etc/example.conf";
|
||||
|
||||
# Our work is done.
|
||||
print <<"MSG";
|
||||
Successfully installed to "$cwd/$installdir"!
|
||||
|
||||
I've also created an example.conf for you and left it in etc/, configure it and
|
||||
rename it to auto.conf or any name of your choice.
|
||||
|
||||
See the Xelhua Wiki at http://wiki.xelhua.org for complete documentation.
|
||||
|
||||
After that, change directory to "$cwd/$installdir" and run `$Bin/auto` (or if
|
||||
"$Bin" is in your PATH; just `auto`).
|
||||
|
||||
If you gave your config file a name other than auto.conf, pass -c=FILENAME to
|
||||
`auto`, like so, if your config is etc/foo.conf: $Bin/auto -c=foo.conf
|
||||
|
||||
Enjoy.
|
||||
MSG
|
||||
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
===============================================================================
|
||||
* Added `wizard`, for creating local Auto config directories.
|
||||
* Made Auto respond properly to PRIVMSGs received before connection.
|
||||
* Fixed an exploit in QDB that allowed users to use services fantasy
|
||||
commands with the bot's account.
|
||||
|
||||
@@ -191,14 +191,17 @@ if ($upref) {
|
||||
|
||||
my $bgenssl = 'genssl';
|
||||
my $bbuildmod = 'buildmod';
|
||||
my $bwizard = 'wizard';
|
||||
if ($libbuild) {
|
||||
$bgenssl = "auto-$bgenssl";
|
||||
$bbuildmod = "auto-$bbuildmod";
|
||||
$bwizard = "auto-$bwizard";
|
||||
}
|
||||
copy("$Bin/bin/auto", "$PREFIX/bin/auto");
|
||||
copy("$Bin/bin/buildmod", "$PREFIX/bin/$bbuildmod");
|
||||
copy("$Bin/bin/genssl", "$PREFIX/bin/$bgenssl");
|
||||
chmod 0755, "$PREFIX/bin/auto", "$PREFIX/bin/$bgenssl", "$PREFIX/bin/$bbuildmod";
|
||||
copy("$Bin/bin/wizard", "$PREFIX/bin/$bwizard");
|
||||
chmod 0755, "$PREFIX/bin/auto", "$PREFIX/bin/$bgenssl", "$PREFIX/bin/$bbuildmod", "$PREFIX/bin/$bwizard";
|
||||
rcopy("$Bin/lib/*", "$libdir/");
|
||||
rcopy("$Bin/lang/*", "$langdir/");
|
||||
rcopy("$Bin/modules/*", "$moddir/");
|
||||
|
||||
Reference in new issue
Block a user