Skip to content

Commit

Permalink
Allow database backup files with multiple . instances
Browse files Browse the repository at this point in the history
Rather than grabbing everything before the first ., pull before
the .sql.

Fixes Varying-Vagrant-Vagrants#403
  • Loading branch information
jeremyfelt committed Nov 13, 2014
1 parent c62acd6 commit 67ffc27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/import-sql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ $sql_count != 0 ]
then
for file in $( ls *.sql )
do
pre_dot=${file%%.*}
pre_dot=${file%%.sql}
mysql_cmd='SHOW TABLES FROM `'$pre_dot'`' # Required to support hypens in database names
db_exist=`mysql -u root -proot --skip-column-names -e "$mysql_cmd"`
if [ "$?" != "0" ]
Expand Down

0 comments on commit 67ffc27

Please sign in to comment.