install.sh 651 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. set -e
  3. build_dir=$1
  4. install_dir=$2
  5. install_type=$3
  6. # With simpleBuildEnvironment flag, we're already in build directory
  7. echo "Installing LZ4 to ${install_dir}..."
  8. # Check if we need to navigate to lz4 source directory
  9. if [ ! -f "./Makefile" ]; then
  10. if [ -d "sources/lz4" ]; then
  11. cd sources/lz4
  12. elif [ -d "lz4" ]; then
  13. cd lz4
  14. else
  15. echo "Error: Makefile not found"
  16. echo "Contents of current directory:"
  17. ls -la
  18. exit 1
  19. fi
  20. fi
  21. # Install according to LFS instructions
  22. make BUILD_STATIC=no PREFIX=${PREFIX} DESTDIR=${install_dir}/${PREFIX}/ install
  23. echo "Installation complete."