mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +02:00
updated lib.sh
This commit is contained in:
parent
1be3d1fb30
commit
cffb158f0f
@ -1,3 +1,4 @@
|
|||||||
|
# TODO: rename to Create folder for container
|
||||||
function create_folder()
|
function create_folder()
|
||||||
{
|
{
|
||||||
local path=$1
|
local path=$1
|
||||||
@ -20,6 +21,19 @@ function symlink_folder()
|
|||||||
fi
|
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()
|
function ensure_file()
|
||||||
{
|
{
|
||||||
local src=$1
|
local src=$1
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
source /opt/kaido/src/libs/bash/envs.sh
|
source /opt/kaido/src/libs/bash/envs.sh
|
||||||
source /opt/kaido/src/libs/bash/functions-common.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-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 $@
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user