phpextdist 593 B

123456789101112131415161718192021222324252627
  1. #! /bin/sh
  2. if test $# -lt 2; then
  3. echo "usage: phpextdist <extension> <version>";
  4. exit 1
  5. fi
  6. phpize=`php-config --prefix`/bin/phpize
  7. distname="$1-$2"
  8. if test ! -f Makefile.in || test ! -f config.m4; then
  9. echo "Did not find required files in current directory"
  10. exit 1
  11. fi
  12. rm -rf modules *.lo *.o *.la config.status config.cache \
  13. config.log libtool php_config.h config_vars.mk Makefile
  14. myname=`basename \`pwd\``
  15. cd ..
  16. cp -rp $myname $distname
  17. cd $distname
  18. $phpize
  19. cd ..
  20. tar cf $distname.tar $distname
  21. rm -rf $distname $distname.tar.*
  22. gzip --best $distname.tar
  23. mv $distname.tar.gz $myname