WordPress-Plugin-Template icon indicating copy to clipboard operation
WordPress-Plugin-Template copied to clipboard

Build script fails

Open orweinberger opened this issue 10 years ago • 7 comments

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

orweinberger avatar Dec 01 '14 14:12 orweinberger

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

athaller avatar Feb 04 '15 04:02 athaller

I got the same error on Ubuntu 12.04

kevinohashi avatar Jun 17 '15 05:06 kevinohashi

@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 avatar Jun 18 '15 01:06 cr33dog

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

cr33dog avatar Jun 18 '15 01:06 cr33dog

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)

DiegoYungh avatar Aug 24 '15 19:08 DiegoYungh

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.

pattonwebz avatar Nov 23 '15 12:11 pattonwebz

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

Maximumz avatar Apr 29 '17 05:04 Maximumz