dirs2pets 371 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. #quickly create pets
  3. #ex: dir2pets glibc 2.10.1-2-w5
  4. [ ! $2 ] && exit 1
  5. APPNAME="$1"
  6. APPVER="$2"
  7. for ANAME in ${APPNAME}-${APPVER} ${APPNAME}_DEV-${APPVER} ${APPNAME}_DOC-${APPVER} ${APPNAME}_NLS-${APPVER}
  8. do
  9. if [ -d $ANAME ];then
  10. echo "Creating ${ANAME}.pet"
  11. rm -f ${ANAME}.pet 2>/dev/null
  12. dir2tgz $ANAME
  13. tgz2pet ${ANAME}.tar.gz
  14. sync
  15. fi
  16. done