mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-06-25 02:13:00 +02:00
now build can take build data from config folder
This commit is contained in:
parent
69b8562557
commit
8d5e564a2b
@ -8,7 +8,9 @@ scriptFolder=${rootFolder}/${prefix}
|
||||
scriptName=$1
|
||||
|
||||
scriptPath=""
|
||||
buildDataPath=""
|
||||
set_script_path $prefix $scriptName
|
||||
set_build_data_path $scriptName
|
||||
|
||||
buildPath="$BUILDS_FOLDER/$scriptName"
|
||||
|
||||
@ -25,7 +27,9 @@ if test -f "$scriptPath"; then
|
||||
fi
|
||||
echo "Executing: $scriptPath $2 $3 $4 $5 $6 $7"
|
||||
echo "in folder: $buildPath"
|
||||
cp -ra "/opt/kaido/build/$scriptName/." "$buildPath"
|
||||
|
||||
cp -ra "$buildDataPath/." "$buildPath"
|
||||
|
||||
cd "$buildPath"
|
||||
$scriptPath $2 $3 $4 $5 $6 $7
|
||||
else
|
||||
|
@ -13,3 +13,16 @@ function set_script_path()
|
||||
fi
|
||||
}
|
||||
|
||||
function set_build_data_path()
|
||||
{
|
||||
local scriptName=$1
|
||||
|
||||
local userBuildDataPath="$KAIDO_CONFIG_FOLDER/build/$scriptName/data"
|
||||
local kaidoBuildDataPath="/opt/kaido/build/$scriptName"
|
||||
|
||||
if [ -d "$userBuildDataPath" ]; then
|
||||
buildDataPath=$userBuildDataPath
|
||||
else
|
||||
buildDataPath=$kaidoBuildDataPath
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user