File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -174,8 +174,7 @@ has_schema_changed(){
174
174
175
175
# Add DROP TABLE to a table schema dump
176
176
add_drop_table (){
177
- # shellcheck disable=SC2016
178
- sed ' /40101 SET @saved_cs_client/i DROP TABLE IF EXISTS `audit_entries`;'
177
+ awk ' /40101 SET @saved_cs_client/{print "DROP TABLE IF EXISTS `audit_entries`;"}1'
179
178
}
180
179
181
180
# Restore the audit_entries table schema if it has changed
@@ -185,7 +184,7 @@ restore_schema(){
185
184
fi
186
185
187
186
gunzip -c " ${snapshot_dir} /schema.gz" | add_drop_table | gzip > " ${snapshot_dir} /schema.new.gz" 2>&3
188
- zcat " ${snapshot_dir} /schema.new.gz" 1>&3
187
+ zcat < " ${snapshot_dir} /schema.new.gz" 1>&3
189
188
190
189
restore_dump schema.new
191
190
}
You can’t perform that action at this time.
0 commit comments