Here's an updated README.md
that includes the previous instructions along with the new functionality for selecting and running scripts from multiple subdirectories:
# Ubuntu Software Installation Scripts
This repository contains various shell scripts for installing popular software on Ubuntu. Each script is designed to streamline the installation process and ensure you have the necessary tools up and running on your system with minimal effort.
## Getting Started
To use these scripts, follow the steps below:
### 1. Clone the Repository
First, clone the repository to your local machine using the following command:
```bash
git clone https://github.com/DeepDN/Ubuntu_Scripts.git
Once the repository is cloned, navigate to the folder corresponding to the software you want to install. Use the cd
command to move into the desired directory:
cd Ubuntu_Scripts/<Software_Folder_Name>
Use the ls
command to list the contents of the directory. You should see a .sh
file (shell script) in white color.
ls
Before you can run the script, you need to make it executable. Use the chmod
command to change the file's permissions:
chmod +x <Script_File_Name>.sh
After changing the permissions, verify that the script is now executable by listing the files with detailed information:
ls -la
The script file should now appear in green, indicating that it is executable.
Finally, run the script to install the software:
./<Script_File_Name>.sh
The script will execute, and the software will be installed on your Ubuntu system.
If you have a directory structure where each subdirectory contains multiple .sh
files, you can use the provided script to run all .sh
files in one or more selected subdirectories at once.
Ensure your main directory is organized with subdirectories containing .sh
files that you want to execute. For example:
/path/to/main_directory
├── subdirectory1
│ ├── script1.sh
│ └── script2.sh
├── subdirectory2
│ ├── script3.sh
│ └── script4.sh
└── subdirectory3
├── script5.sh
└── script6.sh
To run all .sh
files in selected subdirectories, use the following steps:
-
Clone the Repository (if you haven't already):
git clone https://github.com/DeepDN/Ubuntu_Scripts.git
-
Navigate to the Main Directory:
cd /path/to/main_directory
-
Run the Automation Script:
Run the following script to list available subdirectories and select which ones you want to run:
./run_scripts_in_subdirectories.sh
The script will:
- Display a list of subdirectories.
- Allow you to select one or more subdirectories by entering their corresponding numbers.
- Run all
.sh
files in the selected subdirectories.
-
After navigating to the main directory, running the script will look like this:
$ ./run_scripts_in_subdirectories.sh Available subdirectories: 1. subdirectory1 2. subdirectory2 3. subdirectory3 Enter the numbers of the subdirectories you want to run scripts from (separated by spaces): 1 3
-
The script will then execute all
.sh
files insubdirectory1
andsubdirectory3
.
Feel free to contribute to this repository by adding more installation scripts or improving the existing ones. Pull requests are welcome!