hook/do-extract: support extracting .crate files
This commit is contained in:
parent
67d2381243
commit
a8f008f21c
2 changed files with 4 additions and 2 deletions
|
@ -56,6 +56,7 @@ hook() {
|
|||
*.txt) cursufx="txt";;
|
||||
*.7z) cursufx="7z";;
|
||||
*.gem) cursufx="gem";;
|
||||
*.crate) cursufx="crate";;
|
||||
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
|
||||
esac
|
||||
|
||||
|
@ -66,7 +67,7 @@ hook() {
|
|||
fi
|
||||
|
||||
case ${cursufx} in
|
||||
txz|tbz|tlz|tgz)
|
||||
txz|tbz|tlz|tgz|crate)
|
||||
tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||
|
|
|
@ -44,11 +44,12 @@ contents_cksum() {
|
|||
*.txt) cursufx="txt";;
|
||||
*.7z) cursufx="7z";;
|
||||
*.gem) cursufx="gem";;
|
||||
*.crate) cursufx="crate";;
|
||||
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
|
||||
esac
|
||||
|
||||
case ${cursufx} in
|
||||
tar|txz|tbz|tlz|tgz)
|
||||
tar|txz|tbz|tlz|tgz|crate)
|
||||
cksum=$(tar xf "$curfile" --to-stdout | sha256sum | awk '{print $1}')
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "$pkgver: extracting $curfile to pipe.\n"
|
||||
|
|
Loading…
Reference in a new issue