common.sh: Ensure that ./cache exists
This commit is contained in:
parent
b057a8b10c
commit
f69a86baf5
|
@ -17,6 +17,10 @@ function sigterm_handler() {
|
||||||
|
|
||||||
trap 'trap " " SIGINT SIGTERM SIGHUP; kill 0; wait; sigterm_handler' SIGINT SIGTERM SIGHUP
|
trap 'trap " " SIGINT SIGTERM SIGHUP; kill 0; wait; sigterm_handler' SIGINT SIGTERM SIGHUP
|
||||||
|
|
||||||
|
[ -d ./cache/ ] || {
|
||||||
|
[ -f ./cache ] || rm ./cache
|
||||||
|
mkdir ./cache/
|
||||||
|
}
|
||||||
|
|
||||||
function create_image() {
|
function create_image() {
|
||||||
name="$(realpath "./raw/${1}.img")"
|
name="$(realpath "./raw/${1}.img")"
|
||||||
|
|
Loading…
Reference in a new issue