Update storage-test.sh
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user