-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.sh
More file actions
25 lines (19 loc) · 758 Bytes
/
boot.sh
File metadata and controls
25 lines (19 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Prompt the user for the distro number
read -p "Please type the number of the distro you want to work on, according to its position in the distros.txt file: " distro_number
# Read the specified line from the file
selected_line=$(sed -n "${distro_number}p" distros.txt)
# Check if the line was retrieved successfully
if [ -z "$selected_line" ]; then
echo "Error: Invalid distro number or empty file."
exit 1
fi
# Store the line content in a variable
current_distro=$selected_line
# Now you can use the $distro_path variable in your script
echo "The selected distro path is: $current_distro"
export current_distro
# Example usage:
# echo "Working on distro: $distro_path"
# cd "$distro_path"
# # ...other commands using $distro_path