Skip to content

Commit 689f965

Browse files

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎src/plugins/plugin_builder.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/perl
2+
use Cwd;
23

34
#####################################################
45
# A script to automate creation of a new QGIS plugin
@@ -8,6 +9,18 @@
89
#####################################################
910
# $Id$ #
1011

12+
#make sure we are in a the plugins directory otherwise the changes this script will make will
13+
#wreak havoc....
14+
$myDir = fastgetcwd;
15+
print "\n\nChecking that we are in the <qgis dir>/src/plugins/ directory....";
16+
if ($myDir =~ m/src\/plugins$/) {
17+
print "yes\n";
18+
}else {
19+
print "no\n";
20+
print $myDir;
21+
print "\nPlease relocate to the plugins directory before attempting to run this script.\n";
22+
exit;
23+
}
1124
# get the needed information from the user
1225
print "\n\nEnter the directory name under qgis/src/plugins/ where your new plugin will be created.\n";
1326
print "We suggest using a lowercase underscore separated name e.g. clever_plugin\n";

0 commit comments

Comments
 (0)
Please sign in to comment.