By Logi Khoo on
Installed Drush and aliased drush.php
$ alias drush='php modules/drush/drush.php'
I am able to install modules when i cd into "public_html/sites/all" and do "$ drush pm install views cck"
The problem began when i throw in a package.sh script into "public_html/sites/all" directory and ran the command "$ ./package.sh"
#!/bin/sh
#package.sh
drush pm install cck
drush pm install views
And it returned
./package.sh: line 4: drush: command not found
./package.sh: line 5: drush: command not found
I'm in a jailed shell environment where i cannot do "$ ln /path/to/drush.php /usr/bin/drush"
Anyone knows where the problem is? Is it the shell script or the alias?
Comments
Solved
Usually when you get a "command not found" error, you're not pointing to where drush is located on your computer. You could write the shell script like this and it should work
/path/to/drush/drush @$drush_alias pm install cck
In my case, it's this:
/usr/bin/drush/drush @$drush_alias pm install cck