Detect (and prevent) more errors when extracting the archive
This commit is contained in:
parent
d06c652d2a
commit
3f02b79ed1
|
@ -76,10 +76,16 @@ deforaos_release()
|
||||||
_info "Checking the archive..."
|
_info "Checking the archive..."
|
||||||
archive="$PACKAGE-$VERSION.tar.gz"
|
archive="$PACKAGE-$VERSION.tar.gz"
|
||||||
$TAR -xzf "$archive"
|
$TAR -xzf "$archive"
|
||||||
(cd "$PACKAGE-$VERSION" && $MAKE)
|
if [ $? -ne 0 ]; then
|
||||||
|
$RM -r -- "$PACKAGE-$VERSION"
|
||||||
|
_error "Could not extract the archive"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
(cd "$PACKAGE-$VERSION" && $MAKE)
|
||||||
res=$?
|
res=$?
|
||||||
$RM -r "$PACKAGE-$VERSION"
|
$RM -r -- "$PACKAGE-$VERSION"
|
||||||
if [ $res -ne 0 ]; then
|
if [ $res -ne 0 ]; then
|
||||||
|
$RM -- "$archive"
|
||||||
_error "Could not validate the archive"
|
_error "Could not validate the archive"
|
||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user