Closed Philio closed 7 years ago
Why don't you install as composer
?
See https://github.com/kenjis/codeigniter-composer-installer#install-codeigniter
What if you don't have permission to add it to the path?
I install composer
in ~/bin/
.
I was hoping to provide some very simple instructions to someone who uses CodeIgniter on how to use Composer, but to avoid any possible platform specific issues I just created the project myself and added it to a git repo. It looks like your script does a good job from that respect looking at the created project structure (I don't use CI myself, but noticed by default everything is in the public web root)
It would be quite easy to support different composer paths, something like this bash script:
#!/bin/bash
if hash composer 2>/dev/null; then
COMPOSER="composer"
elif [ -a "composer.phar" ]; then
COMPOSER="./composer.phar"
else
echo "Composer not found"
exit 1
fi
echo "Using $COMPOSER"
Your bash script does not work.
Why don't you instruct that installing composer
in ~/bin/
?
Works on Ubuntu:
$ ./find.sh
Composer not found
$ curl -sS https://getcomposer.org/installer | php
...
$ ./find.sh
Using ./composer.phar
$ mv composer.phar ~/bin/composer
$ source ~/.profile
$ ./find.sh
Using composer
Your script does not work on Windows.
I just provided you that as an example of how easy it is to support different configurations. Windows doesn't have bash or shebang support so it obviously won't work. No doubt you also can't run composer.phar directly either, so this is irrelevant to Windows.
If you have no interest in fixing it, just close the issue.
No doubt you also can't run composer.phar directly either, so this is irrelevant to Windows.
You can install CodeIgniter with this installer on Windows. I don't think dropping Windows.
I'm just asking you:
if you don't have permission to move composer to a global bin folder
Why don't you install into ~/bin/
?
or don't know how to use the bin folder in your home directory
Why don't you teach how to?
(or just don't want to)
Why don't you teach why it is better.
And if he/she really don't want to, it is okay just to unzip CodeIgniter offical zip file.
If you use composer.phar
in the current directory, do you download it every time you install CodeIgniter? What do you do it after the installation?
If you install composer via the standard method from their website:
curl -sS https://getcomposer.org/installer | php
The installer doesn't work correctly:
Granted it's not complex to fix, but if you don't have permission to move composer to a global bin folder or don't know how to use the bin folder in your home directory (or just don't want to) then it doesn't work.