Advertisement
s243a

/usr/local/petget/verifypkg.sh

Feb 20th, 2020
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. export LANG=C
  4. DLPKG="$1"
  5. case $DLPKG in
  6.     *.pet)
  7.         cp -f "$DLPKG" tempfileonly.pet
  8.         pet2tgz tempfileonly.pet
  9.         RETVAL=$?
  10.         rm -rf tempfileonly.*
  11.         exit $RETVAL
  12.         ;;
  13.     *.deb)
  14.         dpkg-deb -c "$DLPKG" >/dev/null 2>&1
  15.         exit $?
  16.         ;;
  17.     *.t[gx]z|*.tar.*)
  18.         tar --force-local -I zstd -tf "$DLPKG" >/dev/null 2>&1
  19.         exit $?
  20.         ;;
  21.     *.zst)
  22.         tar --force-local -tf "$DLPKG" >/dev/null 2>&1
  23.         exit $?
  24.         ;;     
  25. esac
  26.  
  27. ### END ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement