mirror of
https://github.com/MillironX/sc2-sequencing.git
synced 2024-12-22 03:08:17 +00:00
Test if USB drive is inserted
This commit is contained in:
parent
7c316ff08b
commit
261e1e01d6
1 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,7 @@ fi
|
|||
|
||||
# Find the directory we are supposed to copy
|
||||
# If no directory was passed, check to see if the current directory will work
|
||||
if [ "$FOLDERIN" = "" ]; then
|
||||
if [[ -n "$FOLDERIN" = "" ]]; then
|
||||
if [[ -n $(find . -type d -name "fast5_pass") ]]; then
|
||||
FOLDERPATH="$PWD"
|
||||
FOLDERNAME=$(basename "$PWD")
|
||||
|
@ -30,7 +30,7 @@ else
|
|||
fi
|
||||
|
||||
# Calculate the FASTAs that need copied
|
||||
if [ ! "$OFFSET" = "1" ]; then
|
||||
if [[ "$OFFSET" -gt 1 ]]; then
|
||||
if [[ "$OFFSET" -lt 7 ]]; then
|
||||
KEEPERS=(01 02 03 04 05 06)
|
||||
else
|
||||
|
@ -48,6 +48,10 @@ fi
|
|||
|
||||
# Find where the flash drive is mounted
|
||||
USBDRIVE=$(mount | grep /media | awk '{print $3}')
|
||||
if [[ -n "$USBDRIVE" ]]; then
|
||||
echo "No USB drive was detected. Exiting now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt the users
|
||||
echo "Extracting FAST5/FASTQ from" "$FOLDERNAME" "to USB Device $USBDRIVE, skipping after" "$OFFSET""."
|
||||
|
|
Loading…
Reference in a new issue