mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +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
|
scriptName=$1
|
||||||
|
|
||||||
scriptPath=""
|
scriptPath=""
|
||||||
|
buildDataPath=""
|
||||||
set_script_path $prefix $scriptName
|
set_script_path $prefix $scriptName
|
||||||
|
set_build_data_path $scriptName
|
||||||
|
|
||||||
buildPath="$BUILDS_FOLDER/$scriptName"
|
buildPath="$BUILDS_FOLDER/$scriptName"
|
||||||
|
|
||||||
@ -25,7 +27,9 @@ if test -f "$scriptPath"; then
|
|||||||
fi
|
fi
|
||||||
echo "Executing: $scriptPath $2 $3 $4 $5 $6 $7"
|
echo "Executing: $scriptPath $2 $3 $4 $5 $6 $7"
|
||||||
echo "in folder: $buildPath"
|
echo "in folder: $buildPath"
|
||||||
cp -ra "/opt/kaido/build/$scriptName/." "$buildPath"
|
|
||||||
|
cp -ra "$buildDataPath/." "$buildPath"
|
||||||
|
|
||||||
cd "$buildPath"
|
cd "$buildPath"
|
||||||
$scriptPath $2 $3 $4 $5 $6 $7
|
$scriptPath $2 $3 $4 $5 $6 $7
|
||||||
else
|
else
|
||||||
|
@ -13,3 +13,16 @@ function set_script_path()
|
|||||||
fi
|
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