Skip to content

Commit

Permalink
use unique goto labels for ID entry
Browse files Browse the repository at this point in the history
should resolve some strange behaviours
  • Loading branch information
ablejec committed Jan 22, 2022
1 parent 5c8b302 commit f8761e5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Templates/x.lib/pISA.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ call :askFile "Enter project ID: " ID
) else (
set ID=%1
)
:Ask
:Askpid
if %ID% EQU "" call :askFile "Enter project ID: " ID
if %ID% EQU "" goto Ask
if %ID% EQU "" goto Askpid
IF EXIST _p_%ID% (
REM Dir exists
echo ERROR: project named *%ID%* already exists
set ID=""
goto Ask
goto Askpid
) ELSE (
REM Continue creating directory
rem echo Creating project %ID%
Expand Down Expand Up @@ -190,15 +190,15 @@ rem echo %ID%
) else (
set ID=%1
)
:Ask
:Askiid
if %ID% EQU "" call :askFile "Enter Investigation ID: " ID
if %ID% EQU "" goto Ask
if %ID% EQU "" goto Askiid
REM Check existence/uniqueness
IF EXIST _I_%ID% (
REM Dir exists
echo ERROR: Investigation named *%ID%* already exists
set ID=""
goto Ask
goto Askiid
) ELSE (
REM Continue creating directory
rem echo %ID%
Expand Down Expand Up @@ -586,9 +586,9 @@ set IDName=%3
rem dir %IDType%* /B /AD
rem Similar Assay IDs
rem %IDType%* /AD
:Ask3
:Askaid
if %IDName% EQU "" call :askFile "Enter Assay ID: " IDName
if %IDName% EQU "" goto Ask3
if %IDName% EQU "" goto Askaid
rem ----------------------------------------------
rem concatenate ID name
set ID=%IDName%-%IDType%
Expand All @@ -602,7 +602,7 @@ rem set IDType=""
rem set IDClass=""
set IDName=""
set ID=""
goto Ask3
goto Askaid
) ELSE (
REM Continue creating directory
)
Expand Down

0 comments on commit f8761e5

Please sign in to comment.