input: Write a function to construct a Bash script that can install a given software. The function should take the name and version of the software as input and generate a script that downloads, extracts, configures, compiles, and installs the software.
  assert install_software("Python", "3.8.5")=='#!/bin/bash\n\n# Download latest version of Python\ncurl -O https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz\n\n# Extract the tgz file\ntar -xzf Python-3.8.5.tgz\n\n# Move into the Python directory\ncd Python-3.8.5\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install\n'
  assert install_software("GCC", "7.5.0")=='#!/bin/bash\n\n# Download latest version of GCC\ncurl -O https://ftp.gnu.org/gnu/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz\n\n# Extract the tar.gz file\ntar -xzf gcc-7.5.0.tar.gz\n\n# Move into the GCC directory\ncd gcc-7.5.0\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install\n'
  assert install_software("OpenSSL", "1.1.1")=='#!/bin/bash\n\n# Download latest version of OpenSSL\ncurl -O https://www.openssl.org/source/openssl-1.1.1.tar.gz\n\n# Extract the tar.gz file\ntar -xzf openssl-1.1.1.tar.gz\n\n# Move into the OpenSSL directory\ncd openssl-1.1.1\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install\n'
  assert install_software("Node.js", "14.15.0")=='#!/bin/bash\n\n# Download latest version of Node.js\ncurl -O https://nodejs.org/dist/v14.15.0/node-v14.15.0.tar.gz\n\n# Extract the tar.gz file\ntar -xzf node-v14.15.0.tar.gz\n\n# Move into the Node.js directory\ncd node-v14.15.0\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install\n'
output: def install_software(name, version):
      return f'''#!/bin/bash
  
  # Download latest version of {name}
  curl -O https://www.{'python.org/ftp/python' if name == 'Python' else 'ftp.gnu.org/gnu/gcc' if name == 'GCC' else 'www.openssl.org/source' if name == 'OpenSSL' else 'nodejs.org/dist'}/{version}/{name.lower() if name == 'Node.js' else name}-{version}.{'tgz' if name == 'Python' else 'tar.gz'}
  
  # Extract the {'tgz' if name == 'Python' else 'tar.gz'} file
  tar -xzf {name.lower() if name == 'Node.js' else name}-{version}.{'tgz' if name == 'Python' else 'tar.gz'}
  
  # Move into the {name} directory
  cd {name.lower() if name == 'Node.js' else name}-{version}
  
  # Run the configure script
  ./configure
  
  # Compile and install
  make
  make install
  '''