Skip to content

Commit

Permalink
Update DiskCopy
Browse files Browse the repository at this point in the history
Aborts when there is a source device found but no target device.
  • Loading branch information
AmNe5iA authored May 7, 2019
1 parent 50a76c3 commit 76904f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DiskCopy
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ then
echo "No block device '$Source' found. Aborting..."
exit 1
fi
if [[ $( lsblk|grep -v $intHDD|grep -v $Source|grep -v sr0|grep -v NAME ) = '' ]]
then
echo ""
echo "No other block device (TARGET) found. Aborting..."
exit 1
fi
while ! [[ $Target =~ ^sd[a-z]$ ]]
do
echo ""
Expand Down

0 comments on commit 76904f0

Please sign in to comment.