#!/bin/bash set -e build_dir=$1 install_dir=$2 install_type=$3 # With simpleBuildEnvironment flag, we're already in build directory echo "Installing LZ4 to ${install_dir}..." # Check if we need to navigate to lz4 source directory if [ ! -f "./Makefile" ]; then if [ -d "sources/lz4" ]; then cd sources/lz4 elif [ -d "lz4" ]; then cd lz4 else echo "Error: Makefile not found" echo "Contents of current directory:" ls -la exit 1 fi fi # Install according to LFS instructions make BUILD_STATIC=no PREFIX=${PREFIX} DESTDIR=${install_dir}/${PREFIX}/ install echo "Installation complete."