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 creates 2 directories #25

Closed DanielFris closed 9 years ago

DanielFris commented 9 years ago

When i run the build script from wp-content/plugins I receive two directories of the same destination folder name property resulting in the following structure:

wp-content/plugins/plugin-name/plugin-name 

The build script also doesn't remove the original template plugin as mentioned in the doc. It's possible I'm misunderstanding or executing incorrectly:

Elsie:plugins danieljfris$ bash wordpress-plugin-template/build-plugin.sh
Plugin name: TEST
Destination folder: test
Include Grunt support (y/n): y
Initialise new git repo (y/n): y
Cloning into 'pjaxwp/pjaxwp'...
remote: Counting objects: 282, done.
remote: Total 282 (delta 0), reused 0 (delta 0), pack-reused 282
Receiving objects: 100% (282/282), 101.35 KiB, done.
Resolving deltas: 100% (145/145), done.
Removing git files...
Updating plugin files...
Initialising new git repo...
Initialized empty Git repository in /Users/danieljfris/Sites/Test/wp-content/plugins/test/test/.git/
Complete!
hlashbrooke commented 9 years ago

You don't need to give the folder name like that - you just need to give the containing folder path. So normally what I do is run ./build-plugin.sh from within the wordpress-plugin-template folder and then set the destination folder to .. - that way it creates a new folder in the wp-content/plugins folder automatically.

I'm not sure what you mean about removing the original template - it's not supposed to remove anything like that. The original template stays just where it is so you can use it again.