makexpi.sh 979 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. APP_NAME=torbutton
  3. #VERSION=`grep em:version src/install.rdf | sed -e 's/["]//g' | cut -f2 -d=`
  4. XPI_NAME="$APP_NAME-`grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3`.xpi"
  5. if [ -e "pkg/$XPI_NAME" ]; then
  6. echo pkg/$XPI_NAME already exists.
  7. rm pkg/$XPI_NAME # meh.
  8. # exit 1
  9. fi
  10. # create jar file (we're just storing files here)
  11. echo ---------- create $APP_NAME.jar file ----------
  12. cd src/chrome
  13. #zip -r0 ../../$APP_NAME.jar ./ -x "*.svn/*"
  14. cd ../..
  15. # create .xpi
  16. echo ---------- create $APP_NAME.xpi ----------
  17. # create the pkg directory if it doesn't exist yet
  18. mkdir -p pkg
  19. cd src
  20. echo zip -X -9r ../pkg/$XPI_NAME ./ -x "chrome/*" -x "*.diff" -x "*.svn/*"
  21. zip -X -9r ../pkg/$XPI_NAME ./ -x "*.svn/*" -x "*.diff" #-x "chrome/*"
  22. #mv ../$APP_NAME.jar ./chrome
  23. #zip -9m ../pkg/$XPI_NAME chrome/$APP_NAME.jar
  24. cd ..
  25. #cp ./pkg/$XPI_NAME ~/
  26. #zip -9m ../../downloads/$sXpiName chrome/$APP_NAME.jar
  27. #zip -9 ../../downloads/$sXpiName install.rdf
  28. #cd ..