mirror of
https://github.com/akuker/RASCSI.git
synced 2026-01-22 21:16:08 +00:00
easyinstall: build hfsutils from source if needed
This commit is contained in:
@@ -153,8 +153,11 @@ function installPackagesWeb() {
|
||||
$APT_PACKAGES_PYTHON \
|
||||
$APT_PACKAGES_WEB
|
||||
|
||||
if ! sudo apt-get install --no-install-recommends --assume-yes -qq hfsutils; then
|
||||
echo "WARNING: Failed to install 'hfsutils'. HFS disk image support may be unavailable."
|
||||
if ! command -v hformat >/dev/null 2>&1 ]; then
|
||||
if ! sudo apt-get install --no-install-recommends --assume-yes -qq hfsutils; then
|
||||
echo "hfsutils package not found in apt repositories; compiling from source..."
|
||||
installHfsutils
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -439,6 +442,24 @@ function installHfdisk() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Clone, compile and install 'hfsutils', HFS disk image tools
|
||||
function installHfsutils() {
|
||||
sudo apt-get install --no-install-recommends --assume-yes -qq autoconf automake libtool m4 </dev/null
|
||||
|
||||
if [ -d "$BASE/hfsutils" ]; then
|
||||
echo "hfsutils source dir already exists; deleting before re-cloning..."
|
||||
rm -rf "$BASE/hfsutils"
|
||||
fi
|
||||
|
||||
git clone https://github.com/rdmark/hfsutils.git "$BASE/hfsutils"
|
||||
cd "$BASE/hfsutils" || exit 1
|
||||
git checkout v2025.12.1
|
||||
autoreconf -i
|
||||
./configure
|
||||
make -j "$CORES"
|
||||
sudo make install
|
||||
}
|
||||
|
||||
# Fetch HFS drivers that the Web Interface uses
|
||||
function fetchHardDiskDrivers() {
|
||||
DRIVER_ARCHIVE="mac-hard-disk-drivers"
|
||||
|
||||
@@ -143,13 +143,27 @@ function installNetatalk() {
|
||||
echo "[$AFP_SHARE_NAME]"
|
||||
echo "path = $AFP_SHARE_PATH"
|
||||
echo "volume name = $AFP_SHARE_NAME"
|
||||
} | sudo sudo tee -a "$AFPCONF" > /dev/null
|
||||
} | sudo tee -a "$AFPCONF" > /dev/null
|
||||
echo "Added share section for $AFP_SHARE_NAME to afp.conf"
|
||||
else
|
||||
echo "Share section [$AFP_SHARE_NAME] already exists; not updating afp.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$ADDITIONAL_SHARE_NAME" && "$ADDITIONAL_SHARE_PATH" ]]; then
|
||||
if ! grep -q "^\[$ADDITIONAL_SHARE_NAME\]" "$AFPCONF"; then
|
||||
{
|
||||
echo
|
||||
echo "[$ADDITIONAL_SHARE_NAME]"
|
||||
echo "path = $ADDITIONAL_SHARE_PATH"
|
||||
echo "volume name = $ADDITIONAL_SHARE_NAME"
|
||||
} | sudo tee -a "$AFPCONF" > /dev/null
|
||||
echo "Added share section for $ADDITIONAL_SHARE_NAME to afp.conf"
|
||||
else
|
||||
echo "Share section [$ADDITIONAL_SHARE_NAME] already exists; not updating afp.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$APPLETALK_INTERFACE" ]]; then
|
||||
echo "$NETATALK_CONFDIR/atalkd.conf:"
|
||||
echo "$APPLETALK_INTERFACE" | sudo tee -a "$NETATALK_CONFDIR/atalkd.conf"
|
||||
|
||||
Reference in New Issue
Block a user