Remove redundant check for existing directory with mkdir -p

The `mkdir -p` command is already idempotent so separately checking whether the directory exists is not necessary.
This commit is contained in:
Robert Müller 2024-05-11 18:06:12 +02:00
parent e9581b87ba
commit 60733bc033

View file

@ -153,9 +153,7 @@ function _copy_sdl() {
mkdir -p ddnet-libs/sdl/"$OS_NAME"/lib"$2"
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2.a ddnet-libs/sdl/"$OS_NAME"/lib"$2"/libSDL2.a
cp compile_libs/sdl/build_"$OS_NAME"_"$1"/libSDL2main.a ddnet-libs/sdl/"$OS_NAME"/lib"$2"/libSDL2main.a
if [ ! -d "ddnet-libs/sdl/include/$OS_NAME" ]; then
mkdir -p ddnet-libs/sdl/include/"$OS_NAME"
fi
mkdir -p ddnet-libs/sdl/include/"$OS_NAME"
cp -R compile_libs/sdl/include/* ddnet-libs/sdl/include/"$OS_NAME"
}