When creating symlinks, remove more than just spaces from mod names, again.

This commit is contained in:
Daniel Ceregatti 2023-08-25 18:08:55 -07:00
parent 745788560f
commit c48f0d60ff
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ list(){
for dir in $(ls -tr ${WORKSHOP_DIR})
do
ID=${dir}
NAME=$(grep name "${WORKSHOP_DIR}/${dir}/meta.cpp" | cut -d '"' -f2 | sed -r 's/\s+//g')
NAME=$(grep name "${WORKSHOP_DIR}/${dir}/meta.cpp" | cut -d '"' -f2 | tr -cd [:alnum:])
SIZE=$(du -sh "${WORKSHOP_DIR}/${dir}" | awk '{print $1}')
printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${NAME}" "${spaces:${#NAME}+1}" ${ID} ${SIZE}
X=$((X+1))

View file

@ -284,7 +284,7 @@ get_mod_name(){
echo "Mod ID ${1} doesn't exist" >&2
exit 1
fi
NAME=$(grep name ${WORKSHOP_DIR}/${ID}/meta.cpp | cut -d '"' -f2 | sed -r 's/\s+//g')
NAME=$(grep name ${WORKSHOP_DIR}/${ID}/meta.cpp | cut -d '"' -f2 | tr -cd [:alnum:])
echo -n ${NAME}
}