To automate the installation of the activate-linux package on a Linux system, you can create a shell script. Below is a script that installs the necessary dependencies, clones the repository, builds, and installs the package.
#!/bin/bash
# Define a function to install dependencies
install_dependencies() {
echo "Installing dependencies..."
sudo apt update
sudo apt install -y \
libconfig-dev libcairo2-dev libxi-dev libx11-dev \
x11proto-core-dev x11proto-dev libxt-dev libxext-dev \
libxfixes-dev libxinerama-dev libxrandr-dev libwayland-dev \
wayland-protocols
}
# Define a function to clone the repository and build the package
build_and_install() {
echo "Cloning the repository..."
git clone https://github.com/MrGlockenspiel/activate-linux
cd activate-linux || exit
echo "Building the package..."
make
echo "Installing the package..."
sudo make install
}
# Main script execution
install_dependencies
build_and_install
echo "Installation complete! You can now use activate-linux."-
Save the script: Save the above code into a file, for example,
install_activate_linux.sh. (Or you can just download theinstall_activate-linux.shfile) -
Make it executable: Run the following command to make the script executable:
chmod +x install_activate_linux.sh
-
Run the script: Execute the script with:
./install_activate_linux.sh
This script assumes you're using a Debian-based system (like Ubuntu). If you're using a different distribution, you'll need to adjust the dependency installation commands accordingly.