install.sh 748 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. set -e
  3. # XZ Utils 5.8.1 install script
  4. # Installs the built package to the destination directory
  5. build_dir=$1
  6. install_dir=$2
  7. install_type=$3
  8. # With simpleBuildEnvironment flag, we're already in build directory
  9. # DESTDIR is overridden to install_dir by USM
  10. # Navigate to source directory if needed
  11. if [ ! -f "Makefile" ]; then
  12. if [ -d "sources/xz/xz" ]; then
  13. cd sources/xz/xz
  14. elif [ -d "xz/xz" ]; then
  15. cd xz/xz
  16. elif [ -d "xz" ]; then
  17. cd xz
  18. else
  19. echo "Error: Makefile not found"
  20. echo "Contents of current directory:"
  21. ls -la
  22. exit 1
  23. fi
  24. fi
  25. echo "Installing XZ Utils 5.8.1 to ${install_dir}..."
  26. make DESTDIR=${install_dir} install
  27. echo "Installation complete."