Skip to content

Commit

Permalink
if then (fixes #2067)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Mar 11, 2021
1 parent 2bbd8f1 commit d3ec25c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ function clone {
checkroot
checkargn $# 1
argument="$1"
path="fdisk -l | grep -o '^/dev/sd[a-z]' | sort -u"

case $argument in

"detect")
if [ -n fdisk -l | grep -o '^/dev/sd[a-z]' | sort -u ]; then
fdisk -l | grep -o '^/dev/sd[a-z]' | sort -u
if [ -n $path ]; then
echo $path

else
echo "Error: Could not detect any devices. Try plugging your device into a different slot."
Expand Down

0 comments on commit d3ec25c

Please sign in to comment.