Skip to content

Commit

Permalink
Make a basic check that you are in the plugins directory before the s…
Browse files Browse the repository at this point in the history
…cript is allowed to run

git-svn-id: http://svn.osgeo.org/qgis/trunk@5212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 7, 2006
1 parent 9950e4d commit b7dfdb4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/plugins/plugin_builder.pl
@@ -1,4 +1,5 @@
#!/usr/bin/perl
use Cwd;

#####################################################
# A script to automate creation of a new QGIS plugin
Expand All @@ -8,6 +9,18 @@
#####################################################
# $Id$ #

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

0 comments on commit b7dfdb4

Please sign in to comment.