[BASH] Removed _timed_ files for custom sql
use updates instead.
This commit is contained in:
parent
8376e13e09
commit
cb375d00ad
1 changed files with 8 additions and 14 deletions
|
|
@ -98,11 +98,12 @@ function assemble() {
|
||||||
n="registry__$hash"
|
n="registry__$hash"
|
||||||
if [[ -z ${!n} ]]; then
|
if [[ -z ${!n} ]]; then
|
||||||
if [ ! -e $updFile ]; then
|
if [ ! -e $updFile ]; then
|
||||||
echo "" > $updFile
|
echo "-- assembled updates" > $updFile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf -v "registry__${hash}" %s "$file"
|
printf -v "registry__${hash}" %s "$file"
|
||||||
echo "-- New update sql: "$file
|
echo "-- New update sql: "$file
|
||||||
|
echo "-- $file"
|
||||||
cat "$entry" >> $updFile
|
cat "$entry" >> $updFile
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
@ -112,7 +113,7 @@ function assemble() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $with_custom = true ]; then
|
if [ $with_custom = true ]; then
|
||||||
custFile=$OUTPUT_FOLDER$database$suffix_custom"_"$curTime".sql"
|
custFile=$OUTPUT_FOLDER$database$suffix_custom".sql"
|
||||||
|
|
||||||
if [ ! ${#custom[@]} -eq 0 ]; then
|
if [ ! ${#custom[@]} -eq 0 ]; then
|
||||||
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
|
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
|
||||||
|
|
@ -127,19 +128,12 @@ function assemble() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
file=$(basename "$entry")
|
if [[ ! -e $custFile ]]; then
|
||||||
hash=$($MD5_CMD "$entry")
|
echo "-- assembled custom" > "$custFile"
|
||||||
hash="${hash%% *}" #remove file path
|
|
||||||
n="registry__$hash"
|
|
||||||
if [[ -z ${!n} ]]; then
|
|
||||||
if [ ! -e $custFile ]; then
|
|
||||||
echo "" > $custFile
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf -v "registry__${hash}" %s "$file"
|
|
||||||
echo "-- New custom sql: "$file
|
|
||||||
cat "$entry" >> $custFile
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "-- $file" >> $custFile
|
||||||
|
cat "$entry" >> $custFile
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue