Hello All,

I have rewritten the Agavi install script that I wrote some time back.

I have taken many suggestions into consideration and although this script is not perfect I welcome comments both positive and negetive.

Features:
--------------------------------
1) Allows the user to install the Agavi trunk
eg: asi install

2) Allows the user to install a specified Agavi branch.
eg: asi install v-dogg


This has been tested on:
Kubuntu Linux
SuSE Linux
Windows XP

With:
Apache 2.0.54
PHP 5.0.5
--------------------------------

Install:
--------------------------------
pear install http://www.weshays.com/pear/asi-2.0.0-beta.tgz
--------------------------------

Usage:
--------------------------------
Use the command "asi help" for more options.
--------------------------------


Problems:
--------------------------------
There is some unix spacific code in [AGAVI]/etc/generate_package.php
that needs to be updated before the script can be used on windows.

I propose the following patches to make that possible:

:: Current :: (lines 8-13)
##############
exec("cd src && cp -Rp * {$tmpdir}");
exec("cp CHANGELOG {$tmpdir}");
exec("cp LICENSE {$tmpdir}");
exec("mkdir {$tmpdir}/scripts");
exec("cp etc/agavi-dist {$tmpdir}/scripts");
exec("cp etc/agavi.bat-dist {$tmpdir}/scripts");
##############

:: Patch ::
##############
chdir('src');
if(isset($_SERVER['windir'])) { // Is windows
exec('xcopy * '.$tmpdir.' /E');
} else {
exec('cp -Rp * '.$tmpdir');
}
copy('CHANGELOG', $tmpdir);
copy('LICENSE', $tmpdir);
mkdir($tmpdir.'/scripts');
copy('etc/agavi-dist', $tmpdir.'/scripts');
copy('etc/agavi.bat-dist', $tmpdir.'/scripts');
##############


:: Current :: (line 130)
##############
exec("rm -rf {$tmpdir}");
##############

:: Patch ::
##############
if(isset($_SERVER['windir'])) { // Is windows
exec('RmDir /S /Q '.$tmpdir);
} else {
exec('rm -rf '.$tmpdir);
}
##############

--------------------------------


Comments / Considerations
--------------------------------
Markus (horros):
how about doing it in PHP so that us windows users can have some
use of it? :)

***Comment***:
I agree however the changes mention above about windows is
neccessary before it will work.


Bob (kludgebox):
Maybe this has already been discussed (or implied), but it would seem
the logical final resting place for this would be a custom phing task.
If you feel so inclined, you might look at the ones we've built
(src/buildtools/phing/*) and build it that way!

***Comment***:
I gave this some thought and currently don't think it is a good idea
to put the agavi svn install in src/buildtools/phing. The reason is
because that would mean that the user would have to have agavi
installed in order to use it when the idea is for it help with installing
agavi.

Brian Neu:
This might be blasphemy, but the thought of using pre-hypertext
processing for shell scripting doesn’t seem ideal. If not bash, then
perl would get my vote.

***Comment***:
I gave this some thought but I don't feel that perl would be the best
choice. The reason is that if someone is wanting to install Agavi then
they already have php installed so why not use that. Of course this
reason is mainly for windows users.
--------------------------------

Regards,
-Wes

--
James "Wes" Hays
Great Basin Development
P.O.Box 3503, Reno, Nevada 89505
Cell: (775) 745-3013
[EMAIL PROTECTED]
http://www.gbdev.com

_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to