Skip to content

Commit

Permalink
fixed based on coderabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzalab committed Nov 1, 2024
1 parent b9fedf0 commit 5dc855f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
38 changes: 33 additions & 5 deletions recipes/gzrt/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
#!/bin/bash

# Automatically download https://www.urbanophile.com/arenn/hacking/gzrt/gzrt-0.8.tar.gz, unpack, and cd into the unpacked folder
# Exit on error
set -e

if [ -z "$PREFIX" ]; then
echo "PREFIX environment variable not set"
exit 1
fi

export CFLAGS="$CFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"

make
chmod +x gzrecover
# Clean any previous builds
make clean || true

if ! make; then
echo "Build failed"
exit 1
fi

if [ ! -f gzrecover ]; then
echo "Build did not produce gzrecover binary"
exit 1
fi

chmod 755 gzrecover

if ! mkdir -p "$PREFIX/bin"; then
echo "Failed to create bin directory"
exit 1
fi

# Remove existing installation if present
rm -f "$PREFIX/bin/gzrecover"

mkdir -p $PREFIX/bin
cp gzrecover $PREFIX/bin
if ! cp gzrecover "$PREFIX/bin/"; then
echo "Failed to install gzrecover"
exit 1
fi
6 changes: 6 additions & 0 deletions recipes/gzrt/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ requirements:
- zlib
host:
- zlib
run:
- zlib

extra:
channels:
- conda-forge
- defaults
recipe-maintainers:
+ - mazzalab

test:
commands:
Expand All @@ -33,6 +37,8 @@ about:
home: https://www.urbanophile.com/arenn/hacking/gzrt
summary: "Unofficial build of the gzip Recovery Toolkit aka gzrecover"
license: GPLv2
license_family: GPL
license_file: LICENSE
description: |
gzrecover is a program that will attempt to extract any readable data
out of a gzip file that has been corrupted.
Expand Down

0 comments on commit 5dc855f

Please sign in to comment.