-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·58 lines (50 loc) · 1.88 KB
/
setup.sh
File metadata and controls
executable file
·58 lines (50 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
CUETOOLS_VERSION="v2.2.6"
# Clone CUETools if not present
if [ ! -d "external/cuetools.net" ]; then
echo "Cloning cuetools.net ($CUETOOLS_VERSION)..."
mkdir -p external
git clone --branch $CUETOOLS_VERSION https://github.com/gchudov/cuetools.net.git external/cuetools.net
cd external/cuetools.net
git submodule update --init --recursive
cd ../..
else
echo "cuetools.net already exists. Ensuring version $CUETOOLS_VERSION..."
cd external/cuetools.net
git fetch origin
git checkout $CUETOOLS_VERSION
git submodule update --init --recursive
cd ../..
fi
# Apply patches
echo "Applying Linux compatibility patches..."
# Freedb patch (SDK style conversion for .NET Core support)
if patch -p0 -N --dry-run < patches/freedb_linux.patch >/dev/null 2>&1; then
patch -p0 < patches/freedb_linux.patch
echo " - Freedb patch applied."
else
echo " - Freedb patch already applied."
fi
# TagLib patch (Fix missing properties required by CUESheet.cs)
if patch -p0 -N --dry-run < patches/taglib_linux.patch >/dev/null 2>&1; then
patch -p0 < patches/taglib_linux.patch
echo " - TagLib patch applied."
else
echo " - TagLib patch already applied."
fi
# UTF.Unknown patch (Automatic charset detection for CUE files)
if patch -p0 -N --dry-run < patches/utf_unknown_encoding.patch >/dev/null 2>&1; then
patch -p0 < patches/utf_unknown_encoding.patch
echo " - UTF.Unknown encoding patch applied."
else
echo " - UTF.Unknown encoding patch already applied."
fi
# Do not generate an error even if the track numbers are not consecutive
if patch -p0 -N --dry-run < patches/CUESheet_tracknum.patch >/dev/null 2>&1; then
patch -p0 < patches/CUESheet_tracknum.patch
echo " - cuesheet tracknum patch applied."
else
echo " - cuesheet tracknum patch already applied."
fi
echo "Setup complete. You can now run 'dotnet build'."