diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-02-15 14:06:26 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-02-15 14:06:26 +0000 |
commit | b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf (patch) | |
tree | 38bb138746c59e28e6a21bea133ba900fbaeabf1 /create/schema/gen.pl | |
parent | b3c8ef909f5494a311e39f89b16d81a4c559f280 (diff) | |
download | zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.tar.gz zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.tar.xz zabbix-b6ecd0b1c0d40bca9a40ab08ddce2a2fa0aa80bf.zip |
- added Clone functionality (Eugene)
- more PostgreSQL support
- allow schama generation in any place calling
git-svn-id: svn://svn.zabbix.com/trunk@3831 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'create/schema/gen.pl')
-rwxr-xr-x | create/schema/gen.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/create/schema/gen.pl b/create/schema/gen.pl index 6200fadc..4df70847 100755 --- a/create/schema/gen.pl +++ b/create/schema/gen.pl @@ -17,11 +17,12 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. use Switch; +use File::Basename; -$file = 'schema.sql'; # Name the file -open(INFO, $file); # Open the file -@lines = <INFO>; # Read it into an array -close(INFO); # Close the file +$file = dirname($0)."/schema.sql"; # Name the file +open(INFO, $file); # Open the file +@lines = <INFO>; # Read it into an array +close(INFO); # Close the file local $output; @@ -229,7 +230,7 @@ sub process_index sub usage { - printf "Usage: gen.pl [c|mysql|oracle|php|postgresql|sqlite]\n"; + printf "Usage: $0 [c|mysql|oracle|php|postgresql|sqlite]\n"; printf "The script generates ZABBIX SQL schemas and C/PHP code for different database engines.\n"; exit; } |