Update storage-test.sh

This commit is contained in:
2025-05-04 10:46:57 -05:00
parent 8820b8101b
commit a3293c2a9f

View File

@@ -115,18 +115,15 @@ if [ "$1" = "" ]; then
echo echo
read -r -p '#: ' drive_path </dev/tty read -r -p '#: ' drive_path </dev/tty
df=0 df=0
echo "$drives" | while IFS= read -r line ; do while IFS= read -r line ; do
((df++)); path=$(echo $line | cut -d'%' -f2) ((df++)); path=$(echo $line | cut -d'%' -f2)
if [ $df -eq $drive_path ]; then if [ $df -eq $drive_path ]; then
ChosenPartition=${path// } ChosenPartition=${path// }
cd "${ChosenPartition}" cd "${ChosenPartition}"
Print_Style "${ChosenPartition} has been selected:" "$YELLOW" Print_Style "${ChosenPartition} has been selected:" "$YELLOW"
echo echo
echo "HERE1: '${ChosenPartition}'"
fi fi
echo "HERE2: '${ChosenPartition}'" done <<< echo "$drives"
done
echo "HERE3: '${ChosenPartition}'"
else else
if [ ! -d "$1" ]; then if [ ! -d "$1" ]; then
Print_Style "Your chosen partition (folder) does not exist! Provide a good one or run without parameters to check the rootfs" "$RED" Print_Style "Your chosen partition (folder) does not exist! Provide a good one or run without parameters to check the rootfs" "$RED"
@@ -137,7 +134,7 @@ else
fi fi
fi fi
echo "HERE4: '${ChosenPartition}'" echo "HERE: '${ChosenPartition}'"
exit 0 exit 0
# Get host board information # Get host board information