Browse Source

Change indent.

master
poikilos 5 years ago
parent
commit
271d89310a
  1. 33
      reset-minetest-install-source.sh

33
reset-minetest-install-source.sh

@ -86,23 +86,22 @@ do
done done
cd "$EM_CONFIG_PATH" || customDie "[$MY_NAME] cd \"$EM_CONFIG_PATH\" failed." cd "$EM_CONFIG_PATH" || customDie "[$MY_NAME] cd \"$EM_CONFIG_PATH\" failed."
if [ -d "$extracted_path" ]; then 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_path/screenshots/*.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_path/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_path/minetest/bin/*.png ~/ || customDie "can't move screenshots from $extracted_path/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_path" || 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

Loading…
Cancel
Save