common.sh: Ensure that ./cache exists

This commit is contained in:
timoxa0 2024-08-12 17:36:10 +05:00
parent b057a8b10c
commit f69a86baf5

View file

@ -17,6 +17,10 @@ function sigterm_handler() {
trap 'trap " " SIGINT SIGTERM SIGHUP; kill 0; wait; sigterm_handler' SIGINT SIGTERM SIGHUP
[ -d ./cache/ ] || {
[ -f ./cache ] || rm ./cache
mkdir ./cache/
}
function create_image() {
name="$(realpath "./raw/${1}.img")"