Skip to content

Commit

Permalink
Added host parameter for folks using different hosts cause one is not…
Browse files Browse the repository at this point in the history
… enough
  • Loading branch information
Akkadius committed Jan 12, 2015
1 parent 5c761d3 commit 73c29fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/scripts/db_update.pl
Expand Up @@ -240,17 +240,17 @@ sub database_dump_compress {
#::: Returns Tab Delimited MySQL Result from Command Line
sub GetMySQLResult{
my $run_query = $_[0];
if($OS eq "Windows"){ return `"$path" --user $user --password="$pass" $db -N -B -e "$run_query"`; }
if($OS eq "Windows"){ return `"$path" --host $host --user $user --password="$pass" $db -N -B -e "$run_query"`; }
if($OS eq "Linux"){
$run_query =~s/`//g;
return `$path --user="$user" --password="$pass" $db -N -B -e "$run_query"`;
return `$path --user="$user" --host $host --password="$pass" $db -N -B -e "$run_query"`;
}
}

sub GetMySQLResultFromFile{
my $update_file = $_[0];
if($OS eq "Windows"){ return `"$path" --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Linux"){ return `"$path" --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Windows"){ return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`; }
if($OS eq "Linux"){ return `"$path" --host $host --user $user --password="$pass" --force $db < $update_file`; }
}

#::: Gets Remote File based on URL (1st Arg), and saves to destination file (2nd Arg)
Expand Down

0 comments on commit 73c29fc

Please sign in to comment.