File: hack_update

package info (click to toggle)
advene 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 10,588 kB
  • ctags: 6,326
  • sloc: xml: 56,303; python: 50,385; perl: 741; sh: 186; makefile: 83; ansic: 18
file content (33 lines) | stat: -rwxr-xr-x 697 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh

SRC=${HOME}/src/advene
APP=${SRC}/dist/Advene.app
LIBDIR=${SRC}/lib/advene
PYDIR=${APP}/Contents/Resources/lib/python2.5
SITE=${PYDIR}/site-packages.zip

if [ ! -d ${APP} ]
then
  echo "Need an uncompressed $APP"
  exit 1
fi

if [ ! -d /opt/local/bin ]
then
  echo "Need to chmod /opt/local/bin"
  exit 1
fi

# Cleanup old .pyc
find ${LIBDIR} -name \*.pyc | xargs rm
/opt/local/bin/python2.5 -mcompileall ${LIBDIR}

# Extract site-packages
[ -d ${PYDIR}/t ] && /bin/rm -rf ${PYDIR}/t
mkdir ${PYDIR}/t || exit 1
unzip -d ${PYDIR}/t ${SITE}
rsync -av --exclude=\*.py --exclude=.svn ${LIBDIR}/ ${PYDIR}/t/advene/
/bin/rm ${SITE}
(cd ${PYDIR}/t ; zip -r ${SITE} .)
/bin/rm -rf ${PYDIR}/t