.
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-19 23:09:43 +12:00
parent d8236a58df
commit 1b16741288
6 changed files with 114 additions and 34 deletions

View File

@ -12,6 +12,10 @@ _autocommandrun_volume() {
case "$command" in
create)
if docker volume ls | grep -q ${volume_name}; then
echo "Volume ${volume_name} already exists - leaving unchanged"
return
fi
echo "Creating volume ${volume_name}"
docker volume create ${volume_name}
;;
@ -39,6 +43,10 @@ _autocommandrun_path() {
case "$command" in
create)
if [ -d "${path}" ]; then
echo "Path ${path} already exists - unchanged"
return
fi
echo "Creating path ${path}"
mkdir -p ${path}
;;
@ -80,6 +88,12 @@ _autocommandrun_file() {
case "$command" in
create)
filepath_parent=$(dirname ${filepath})
filepath_child=$(basename ${filepath})
if [ ! -d "${filepath_parent}" ]; then
echo "Parent directory ${filepath_parent} of ${filepath_child} does not exist - creating"
mkdir -p ${filepath_parent}
fi
;;
nuke)
rm -f ${filepath}