Skip to content
Permalink
Browse files

Make a basic check that you are in the plugins directory before the s…

…cript is allowed to run

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

#####################################################
# A script to automate creation of a new QGIS plugin
@@ -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";

0 comments on commit b7dfdb4

Please sign in to comment.
You can’t perform that action at this time.