From 77e6999375fa8146f3bbb37a6658f6b9dc3c6982 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 8 May 2016 22:58:38 +0100 Subject: [PATCH] fixes for map compressor --- lgsm/functions/compress_unreal2_maps.sh | 8 ++++---- lgsm/functions/compress_ut99_maps.sh | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index a7157d9ed..5c001ba77 100644 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -19,7 +19,7 @@ echo "" echo "${compressedmapsdir}" echo "" while true; do - read -p "Start compression [y/N]" yn + read -e -i "y" -p "Start compression [Y/n]" yn case $yn in [Yy]* ) break;; [Nn]* ) echo Exiting; return;; @@ -27,9 +27,9 @@ while true; do esac done mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${filesdir}/Maps/*.uz2" +rm -rfv "${filesdir}/Maps/"*.uz2 cd "${systemdir}" for map in "${filesdir}/Maps/*"; do - ./ucc-bin compress "../Maps/${map}" --nohomedir + ./ucc-bin compress "${map}" --nohomedir done -mv -fv "${filesdir}/Maps/*.uz2" "${compressedmapsdir}" +mv -fv "${filesdir}/Maps/"*.uz2 "${compressedmapsdir}" diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 948fb9661..261b8bdd0 100644 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -19,7 +19,7 @@ echo "" echo "${compressedmapsdir}" echo "" while true; do - read -p "Start compression [y/N]" yn + read -e -i "y" -p "Start compression [Y/n]" yn case $yn in [Yy]* ) break;; [Nn]* ) echo Exiting; return;; @@ -27,9 +27,10 @@ while true; do esac done mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 -rm -rfv "${filesdir}/Maps/*.unr.uz" +rm -rfv "${filesdir}/Maps/"*.unr.uz cd "${systemdir}" for map in "${filesdir}/Maps/*"; do - ./ucc-bin compress "../Maps/${map}" --nohomedir + ./ucc-bin compress "${map}" --nohomedir done -mv -fv "${filesdir}/Maps/*.unr.uz" "${compressedmapsdir}" +echo "mv -fv ${filesdir}/Maps/*.unr.uz ${compressedmapsdir}" +mv -fv "${filesdir}/Maps/"*.unr.uz "${compressedmapsdir}"