Browse Source

Fix path of release.txt.

master
poikilos 5 years ago
parent
commit
999c906df6
  1. 16
      reset-minetest-install-source.sh

16
reset-minetest-install-source.sh

@ -90,19 +90,19 @@ if [ -d "$extracted_path" ]; then
# NOTE: ls -lR provides a count, so it is not suitable unless output # NOTE: ls -lR provides a count, so it is not suitable unless output
# is parsed. `| wc -l` is easier (word count). # is parsed. `| wc -l` is easier (word count).
screenshot_count=0 screenshot_count=0
if [ -d $extracted_path/screenshots/ ]; then if [ -d $extracted_path/screenshots ]; then
screenshot_count=`ls $extracted_path/screenshots/*.png | wc -l` screenshot_count=`ls $extracted_path/screenshots/*.png | wc -l`
fi fi
if [ $screenshot_count -gt 0 ]; then if [ $screenshot_count -gt 0 ]; then
mv $extracted_path/screenshots/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png" mv $extracted_path/screenshots/*.png ~/ || customDie "can't move screenshots from $extracted_path/screenshots/*.png"
rmdir --ignore-fail-on-non-empty "$extracted_path/screenshots" rmdir --ignore-fail-on-non-empty "$extracted_path/screenshots"
fi fi
if [ `ls $extracted_name/minetest/bin/*.png | wc -l` -gt 0 ]; then if [ `ls $extracted_path/minetest/bin/*.png | wc -l` -gt 0 ]; then
# if [ ! -d screenshots ]; then mkdir screenshots; fi # if [ ! -d screenshots ]; then mkdir screenshots; fi
# NOTE: system-wide install of minetest puts screenshots in ~/ (cwd) # NOTE: system-wide install of minetest puts screenshots in ~/ (cwd)
mv $extracted_name/minetest/bin/*.png ~/ || customDie "can't move screenshots from $extracted_name/minetest/bin/*.png" mv $extracted_path/minetest/bin/*.png ~/ || customDie "can't move screenshots from $extracted_path/minetest/bin/*.png"
fi fi
rm -Rf "$extracted_name" || customDie "can't remove $extracted_name" rm -Rf "$extracted_path" || customDie "can't remove $extracted_name"
fi fi
if [ "@$enable_offline" = "@true" ]; then if [ "@$enable_offline" = "@true" ]; then
@ -110,11 +110,11 @@ if [ "@$enable_offline" = "@true" ]; then
customDie "* Offline install is impossible without '`pwd`/$zip_name'." customDie "* Offline install is impossible without '`pwd`/$zip_name'."
fi fi
else else
wget -O $zip_name $url/$zip_name || customDie "no $zip_name at $url" wget -O "$EM_CONFIG_PATH/$zip_name" $url/$zip_name || customDie "no $zip_name at $url"
fi fi
unzip -u $zip_name || customDie "Can't unzip $zip_name" unzip -u $zip_name || customDie "Can't unzip $zip_name"
cd "$extracted_name" cd "$extracted_name" || customDie "Unzipping \"$zip_name\" in \"`pwd`\" did not result in a readable directory named \"$extracted_name\" there."
cat "$extracted_name/release.txt" cat "$extracted_path/release.txt"
echo "compiling libraries..." echo "compiling libraries..."
date date
start=`date +%s` start=`date +%s`

Loading…
Cancel
Save