From 79f3adddea77ad61699e57e4a3903858ca8d5fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Camargo?= Date: Mon, 23 Dec 2024 18:29:44 -0800 Subject: [PATCH] Test with help dialogue --- recipes/pdb2fasta/build.sh | 2 +- recipes/pdb2fasta/meta.yaml | 2 +- recipes/pdb2fasta/pdb2fasta.patch | 34 ++++++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/recipes/pdb2fasta/build.sh b/recipes/pdb2fasta/build.sh index 6c43b17ac63ef..6dfee62b849e2 100644 --- a/recipes/pdb2fasta/build.sh +++ b/recipes/pdb2fasta/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -euo mkdir -p ${PREFIX}/bin -${CC} ${CFLAGS} pdb2fasta.c -o pdb2fasta +${CC} -O2 pdb2fasta.c -o pdb2fasta mv pdb2fasta ${PREFIX}/bin diff --git a/recipes/pdb2fasta/meta.yaml b/recipes/pdb2fasta/meta.yaml index c6eb6eb29d547..f1a27eb513069 100644 --- a/recipes/pdb2fasta/meta.yaml +++ b/recipes/pdb2fasta/meta.yaml @@ -22,7 +22,7 @@ requirements: test: commands: - - pdb2fasta + - pdb2fasta --help about: home: "https://github.com/kad-ecoli/pdb2fasta" diff --git a/recipes/pdb2fasta/pdb2fasta.patch b/recipes/pdb2fasta/pdb2fasta.patch index e97d2f625cabd..d0cf696829648 100644 --- a/recipes/pdb2fasta/pdb2fasta.patch +++ b/recipes/pdb2fasta/pdb2fasta.patch @@ -1,8 +1,40 @@ diff --git a/pdb2fasta.c b/pdb2fasta.c -index 9642d03..f197f1f 100644 +index 9642d03..9e8eef1 100644 --- a/pdb2fasta.c +++ b/pdb2fasta.c @@ -1,3 +1,4 @@ +#include #include #include + +@@ -99,14 +100,24 @@ char *pdb2fasta(char *pdb_file){ + } + + int main(int argc, char** argv){ +- if (argc<2){ +- printf("pdb2fasta pdb.pdb > seq.fasta\n"); +- printf(" convert PDB file pdb.pdb to FASTA sequence file seq.fasta\n"); ++ if (argc < 2){ ++ printf("Usage: pdb2fasta pdb.pdb > seq.fasta\n"); ++ printf(" Convert PDB file pdb.pdb to FASTA sequence file seq.fasta\n"); + return argc; + } +- +- int i; +- for (i=1;i seq.fasta\n"); ++ return 0; ++ } ++ ++ for (int i=1; i