updated lib.sh

This commit is contained in:
Snogard 2025-03-05 14:51:22 +01:00
parent 1be3d1fb30
commit cffb158f0f
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# TODO: rename to Create folder for container
function create_folder()
{
local path=$1
@ -20,6 +21,19 @@ function symlink_folder()
fi
}
function ensure_folder(){
local dst=$1
if [ ! -d "${}" ]; then
echo "Creating folder at path $(dst)"
mkdir -p "${dst}"
if [ ! $? -eq 0 ]; then
echo "Could not create folder, make sure you have the right permissions"
exit 1
fi
fi
}
function ensure_file()
{
local src=$1

View File

@ -1,4 +1,8 @@
source /opt/kaido/src/libs/bash/envs.sh
source /opt/kaido/src/libs/bash/functions-common.sh
source /opt/kaido/src/libs/bash/functions-commands.sh
source /opt/kaido/src/libs/bash/functions-containers.sh
source /opt/kaido/src/libs/bash/functions-containers.sh
function kaido() {
/opt/kaido/kaido.sh $@
}