# #
###############################################################################
- ## Name of this program
- #
- PNAME = Pomona
- PSNAME = pomona
-
DESTDIR=$(INSTALLER_DIR)
-INSTALL = /usr/bin/install -c
+INSTALL = install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALLNLSDIR = $(DESTDIR)/usr/share/locale
# #
###############################################################################
-echo "Running the Pomona Text Installer..."
-echo -n "Loading modules:"
-for i in md_mod dm_mod ext3 ext4 xfs reiserfs reiser4 btrfs; do
- echo -n " $i"
- modprobe $i
-done
-echo # Newline
+echo "Running the Pomona Installer..."
- python /usr/lib/pomona/installer.py $@
+ python /usr/lib/pomona/pomona.py $@
+ret=$?
for i in $@; do
if [ "$i" == "--debug" ]; then
--- /dev/null
- if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
+#!/bin/sh
+
+PYTHON=$(which python 2>/dev/null)
+
+if [ -z "${PYTHON}" ]; then
+ # Python is not present. Fail silently.
+ exit 0
+fi
+
+files=""
+for i in $*; do
+ if [ -e ${i}c ] && [ -e ${i}o ]; then
+ continue # all files we want are already there
+ fi
+ files="$files $i"
+done
+
+if [ -z "${files}" ]; then
+ # No files need to be proceeded.
+ exit 0
+fi
+
+$PYTHON -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+print 'Byte-compiling python modules...'
+for file in string.split(files):
- py_compile.compile(path)
++ if not os.path.exists(file) or not (len(file) >= 3 and file[-3:] == '.py'):
+ continue
+ print file,
+ sys.stdout.flush()
- if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
++ py_compile.compile(file)
+print" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+print 'Byte-compiling python modules (optimised versions) ...'
+for file in string.split(files):
- py_compile.compile(path)
++ if not os.path.exists(file) or not (len(file) >= 3 and file[-3:] == '.py'):
+ continue
+ print file,
+ sys.stdout.flush()
++ py_compile.compile(file)
+print" 2>/dev/null || :