mirror of
https://github.com/spirit-x64/scripts.git
synced 2024-11-24 00:03:10 +03:00
only make a backup if doesnt exist already
This commit is contained in:
parent
936a18abe8
commit
c8d2afd235
@ -68,7 +68,10 @@ if [[ -f "$html_file" ]]; then
|
|||||||
fi
|
fi
|
||||||
done < "${html_file}.tmp"
|
done < "${html_file}.tmp"
|
||||||
|
|
||||||
cp "$html_file" ".original-${html_file}"
|
if [[ ! -f ".original-${html_file}" ]]; then
|
||||||
|
cp "$html_file" ".original-${html_file}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo generated ".original-${html_file}"
|
echo generated ".original-${html_file}"
|
||||||
html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true "${html_file}.tmp" > "$html_file"
|
html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true "${html_file}.tmp" > "$html_file"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user