Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
awit-frameworks
awit-perl-toolkit
Commits
6944c201
Commit
6944c201
authored
Sep 14, 2016
by
Nigel Kukard
Browse files
Whitespace cleanup
parent
d2effe80
Pipeline
#196
passed with stages
in 3 minutes and 1 second
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
bin/convert-tsql
View file @
6944c201
#!/bin/bash
# Database translation/creation script
# Copyright (C) 2009-201
4
, AllWorldIT
# Copyright (C) 2009-201
6
, AllWorldIT
# Copyright (C) 2008, LinuxRulz
#
# This program is free software; you can redistribute it and/or modify
...
...
@@ -40,7 +40,7 @@ display_usage() {
# Check we have our params
if
[
-z
"
$database
"
-o
-z
"
$file
"
]
then
display_usage
display_usage
fi
...
...
@@ -48,13 +48,13 @@ fi
# Check file exists
if
[
!
-f
"
$file
"
]
then
echo
"ERROR: Cannot open file '
$file
'"
exit
1
echo
"ERROR: Cannot open file '
$file
'"
exit
1
fi
# Check what we converting for
case
"
$database
"
in
"mysql"
|
"mysql55"
)
"mysql"
|
"mysql55"
)
sed
\
-e
"s/@PREFIX@/
$prefix
/g"
\
-e
's/@PRELOAD@/SET FOREIGN_KEY_CHECKS=0;/'
\
...
...
@@ -67,7 +67,7 @@ case "$database" in
-e
's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/'
<
"
$file
"
;;
"mysql4"
)
"mysql4"
)
sed
\
-e
"s/@PREFIX@/
$prefix
/g"
\
-e
's/@PRELOAD@/SET FOREIGN_KEY_CHECKS=0;/'
\
...
...
@@ -104,9 +104,11 @@ case "$database" in
;;
*
)
echo
"ERROR: Invalid database type '
$database
'"
exit
1
;;
echo
"ERROR: Invalid database type '
$database
'"
exit
1
;;
esac
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment