mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-13 02:33:17 +00:00
Quote pathnames in case of spaces and such
This commit is contained in:
@@ -90,15 +90,16 @@ esac
|
|||||||
case "X$WORLD" in
|
case "X$WORLD" in
|
||||||
Xhttp*)
|
Xhttp*)
|
||||||
echo "Downloading world via HTTP"
|
echo "Downloading world via HTTP"
|
||||||
wget -q -O - $WORLD > /data/world.zip
|
wget -q -O - "$WORLD" > /data/world.zip
|
||||||
echo "Unzipping word"
|
echo "Unzipping word"
|
||||||
unzip -q /data/world.zip
|
unzip -q /data/world.zip
|
||||||
rm -f /data/world.zip
|
rm -f /data/world.zip
|
||||||
if [ ! -d /data/world ]; then
|
if [ ! -d /data/world ]; then
|
||||||
echo Renaming world directory...
|
echo Renaming world directory...
|
||||||
for i in /data/*/level.dat; do
|
for i in /data/*/level.dat; do
|
||||||
if [ -f $i ]; then
|
if [ -f "$i" ]; then
|
||||||
mv -f `dirname $i` /data/world
|
d=`dirname "$i"`
|
||||||
|
mv -f "$d" /data/world
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -225,16 +226,16 @@ fi
|
|||||||
for m in /mods/*.jar
|
for m in /mods/*.jar
|
||||||
do
|
do
|
||||||
if [ -f "$m" ]; then
|
if [ -f "$m" ]; then
|
||||||
echo Copying mod `basename $m`
|
echo Copying mod `basename "$m"`
|
||||||
cp -f $m /data/mods
|
cp -f "$m" /data/mods
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[ -d /data/config ] || mkdir /data/config
|
[ -d /data/config ] || mkdir /data/config
|
||||||
for c in /config/*
|
for c in /config/*
|
||||||
do
|
do
|
||||||
if [ -f "$c" ]; then
|
if [ -f "$c" ]; then
|
||||||
echo Copying configuration `basename $m`
|
echo Copying configuration `basename "$c"`
|
||||||
cp -rf $c /data/config
|
cp -rf "$c" /data/config
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user