diff --git a/storage-test.sh b/storage-test.sh index 048bc0f..9556760 100755 --- a/storage-test.sh +++ b/storage-test.sh @@ -118,20 +118,22 @@ if [ "$1" = "" ]; then echo "$drives" | while IFS= read -r line ; do ((df++)); path=$(echo $line | cut -d'%' -f2) if [ $df -eq $drive_path ]; then - cd ${path// } + cd "${path// }" + ls -l Print_Style "${path// } has been selected:" "$YELLOW" echo + exit 0 break fi done else - 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" - exit 1 - else - ChosenPartition="$1" - cd "$ChosenPartition" - fi + 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" + exit 1 + else + ChosenPartition="$1" + cd "$ChosenPartition" + fi fi # Get host board information