hlashbrooke / WordPress-Plugin-Template

A robust code template for creating a standards-compliant WordPress plugin.
https://hughlashbrooke.com/
GNU General Public License v2.0
1.03k stars 329 forks source link

Build script fails #21

Open orweinberger opened 10 years ago

orweinberger commented 10 years ago

Tried running the build script, getting an error message:

$ sh build-plugin.sh 
Plugin name: test123
Destination folder: test123
Include Grunt support (y/n): y
Initialise new git repo (y/n): y
build-plugin.sh: 16: build-plugin.sh: Bad substitution
athaller commented 9 years ago

Could you provide more info? I just installed this with the build script and had no issues. Did it on Mac 10.10 running command: $ ./build-plugin.sh Plugin name: name Destination folder: Include Grunt support (y/n): n Initialise new git repo (y/n): n

The files were already in my plugins folder which is why I left the destination folder line blank.. Permissions on my folder was: User R&W, everyone R

kevinohashi commented 9 years ago

I got the same error on Ubuntu 12.04

cr33dog commented 9 years ago

@kevinohashi

See here: https://github.com/hlashbrooke/WordPress-Plugin-Template/issues/19

Try editing line 24 in the build script. I'm on an Ubuntu derivative.

cr33dog commented 9 years ago

Oops - this might be another issue altogether. Sorry for the noise!

DiegoYungh commented 9 years ago

It's Ubuntu bash/dash specific error Give your user exec rights on the file:

chmod +x build-plugin.sh

and execute it like:

./build-plugin.sh

Worked here (the same could be acomplished by using "bash" instead of "sh" when executing the build file)

pattonwebz commented 9 years ago

I encountered this same issue on an Ubuntu machine. The solution from @DiegoYungh worked for me.

Perhaps the build script could be modified to be more OS agnostic, or deal with common nuances such as this one, as this fails on the latest LTS Ubuntu and also on Raspbian.

Failing on 2 separate Debian based distros makes me think this same thing would probably happen with other OSs built from a Debian base.

Maximumz commented 7 years ago

Thanks @DiegoYungh, that worked for me on Lubuntu 16.10_Yakkety_Yak Note use ./build-plugin.sh not sudo sh build-plugin.sh once applied privliges chmod +x build-plugin.sh