mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
(improvement)(build) moveToRuntime checks if the tar.gz file exists, and if it doesn't, no operation is performed. (#544)
This commit is contained in:
@@ -29,11 +29,15 @@ function setEnvToWeb {
|
|||||||
|
|
||||||
function moveToRuntime {
|
function moveToRuntime {
|
||||||
model_name=$1
|
model_name=$1
|
||||||
tar -zxvf ${buildDir}/supersonic-${model_name}.tar.gz -C ${runtimeDir}
|
file="${buildDir}/supersonic-${model_name}.tar.gz"
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
tar -zxvf "$file" -C ${runtimeDir}
|
||||||
mv ${runtimeDir}/launchers-${model_name}-* ${runtimeDir}/supersonic-${model_name}
|
mv ${runtimeDir}/launchers-${model_name}-* ${runtimeDir}/supersonic-${model_name}
|
||||||
|
|
||||||
mkdir -p ${runtimeDir}/supersonic-${model_name}/webapp
|
mkdir -p ${runtimeDir}/supersonic-${model_name}/webapp
|
||||||
cp -fr ${buildDir}/webapp/* ${runtimeDir}/supersonic-${model_name}/webapp
|
cp -fr ${buildDir}/webapp/* ${runtimeDir}/supersonic-${model_name}/webapp
|
||||||
|
else
|
||||||
|
echo "File $file does not exist. Skipping the move to runtime."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveAllToRuntime {
|
function moveAllToRuntime {
|
||||||
|
|||||||
Reference in New Issue
Block a user