Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
Create a symlink on not-windows to current minecraft decompile dir
This is useful for project developers switching back and forth between 1.12.2 and 1.13 so we can have our IDE automatically use the current version we are working on for included mc-dev files.
Dieser Commit ist enthalten in:
Ursprung
a081172687
Commit
fa8406dab4
@ -6,9 +6,9 @@ PS1="$"
|
|||||||
basedir="$(cd "$1" && pwd -P)"
|
basedir="$(cd "$1" && pwd -P)"
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
|
windows="$([[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]] && echo "true" || echo "false")"
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||||
classdir="$decompiledir/classes"
|
classdir="$decompiledir/classes"
|
||||||
|
|
||||||
echo "Extracting NMS classes..."
|
echo "Extracting NMS classes..."
|
||||||
if [ ! -d "$classdir" ]; then
|
if [ ! -d "$classdir" ]; then
|
||||||
mkdir -p "$classdir"
|
mkdir -p "$classdir"
|
||||||
@ -30,4 +30,13 @@ if [ ! -d "$decompiledir/net/minecraft/server" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# set a symlink to current
|
||||||
|
currentlink="$workdir/Minecraft/current"
|
||||||
|
if ([ ! -e "$currentlink" ] || [ -L "$currentlink" ]) && [ "$windows" == "false" ]; then
|
||||||
|
echo "Pointing $currentlink to $minecraftversion"
|
||||||
|
rm -rf "$currentlink"
|
||||||
|
ln -sfn "$minecraftversion" "$currentlink"
|
||||||
|
fi
|
||||||
|
|
||||||
)
|
)
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren