mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-07 06:41:17 +00:00
Prevent problems when we can't get metadata, usually because meta.cpp doesn't exist. Some mods don't seem to have one.
This commit is contained in:
parent
4c09ef752c
commit
a422694010
1 changed files with 5 additions and 0 deletions
|
@ -97,6 +97,11 @@ get_mod_name(){
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NAME=$(grep name ${WORKSHOP_DIR}/${1}/meta.cpp | cut -d '"' -f2 | tr -cd [:alnum:])
|
NAME=$(grep name ${WORKSHOP_DIR}/${1}/meta.cpp | cut -d '"' -f2 | tr -cd [:alnum:])
|
||||||
|
if [[ ${NAME} = "" ]]
|
||||||
|
then
|
||||||
|
echo "Could not get metadata. See above. Exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo -n ${NAME}
|
echo -n ${NAME}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue