diff --git a/scripts/getSeq.sh b/scripts/getSeq.sh index e915b08..89f1bc2 100755 --- a/scripts/getSeq.sh +++ b/scripts/getSeq.sh @@ -1,17 +1,17 @@ -DIR=$HOME/counter +DIR=$PWD/counter mkdir -p $DIR agrc=$# seqName=default action="next" -if [ ! "$agrc" -le 0 ] -then -#{ +if [ ! "$agrc" -le 0 ] +then +#{ # echo "WARNING: There is no argument, sequence name is used default" #} -#else +#else #{ seqName=$1 - if [ "$2" != "" ] + if [ "$2" != "" ] then action=$2 fi @@ -20,15 +20,15 @@ fileName=$DIR/$seqName count=0 returnCount=0 -if [ -f $fileName ] +if [ -f $fileName ] then #{ - + count=$(cat $fileName) if [ "$action" == "current" ] then returnCount=$count - + elif [ "$action" == "current++" ] then returnCount=$count @@ -54,7 +54,7 @@ returnCount=$count fi #} -#else +else #{ #echo "initilize count" returnCount=$count