Commit 77c1137f authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Compile dtd2cduce and clean-up the tools directory.

parent adfee158
open Netcgi
exception Timeout
......@@ -7,9 +6,7 @@ exception Timeout
(e.g. type XHTML_inlien = [ ( Char | ... ) ])
- better pretty-printing
*)
open Printf
open Pxp_yacc
open Pxp_lexer_types
open Pxp_types
let mixed_table : ('a,unit) Hashtbl.t = Hashtbl.create 127
......
(executable
(name dtd2cduce)
(modules dtd2cduce)
(libraries threads netcgi2 pxp)
)
ROOTDIR="$(git rev-parse --git-dir)"
cd $ROOTDIR/..
echo "Testing the program before commit..."
echo -n "Building cduce..."
make > /dev/null 2> /dev/null
echo "done."
if test $? -ne 0; then
echo "Building cduce failed. Aborting commit."
exit 2
fi
echo "Testing..."
tests/test.sh
if test $? -ne 0; then
echo "Tests failed. Aborting commit."
exit 2
fi
echo "Success!"
exit 0
#!/bin/sh
ROOT=$(git rev-parse --show-toplevel)
HOOKSDIR=$ROOT/tools/git_hooks
HOOKS=pre-commit
GITHOOKSDIR=$ROOT/.git/hooks
echo "Installing git hooks to local repository..."
for i in $HOOKS; do
echo -n "Installing $HOOKSDIR/$i..."
if test -e $GITHOOKSDIR/$i && test ! -h $GITHOOKSDIR/$i; then
echo -n "\nWarning: $GITHOOKSDIR/$i already exists and is not a symbolic"
echo " link. $HOOKSDIR/$i not installed."
else
ln -sf $HOOKSDIR/$i $GITHOOKSDIR/$i
echo "done."
fi
done
echo "Finished."
#!/bin/sh
# Shell script from Pietro Abate <pietro.abate@anu.edu.au> to create
# Mac OS X packages. Call from Makefile by "make package-macosx".
#########################################################################
# #
# Objective Caml #
# #
# Damien Doligez, projet Moscova, INRIA Rocquencourt #
# #
# Copyright 2003 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the Q Public License version 1.0. #
# #
#########################################################################
# $Id: make-package-macosx,v 1.10.2.2 2006/01/04 13:05:49 doligez Exp $
# adapted to cduce by Pietro.Abate <pietro.abate@anu.edu.au>
set -x
cd package-macosx
rm -rf cduce.pkg cduce-rw.dmg
mkdir -p resources
cat >Description.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IFPkgDescriptionDeleteWarning</key>
<string></string>
<key>IFPkgDescriptionDescription</key>
<string>Cduce</string>
<key>IFPkgDescriptionTitle</key>
<string>Cduce</string>
<key>IFPkgDescriptionVersion</key>
<string>${VERSION}</string>
</dict>
</plist>
EOF
cat >Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>cduce ${VERSION}</string>
<key>CFBundleIdentifier</key>
<string>http://www.cduce.org</string>
<key>CFBundleName</key>
<string>Cduce</string>
<key>CFBundleShortVersionString</key>
<string>${VERSION}</string>
<key>IFPkgFlagAllowBackRev</key>
<true/>
<key>IFPkgFlagAuthorizationAction</key>
<string>AdminAuthorization</string>
<key>IFPkgFlagDefaultLocation</key>
<string>/</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFlagRelocatable</key>
<false/>
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
<true/>
<key>IFPkgFlagUpdateInstalledLanguages</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
EOF
# stop here -> |
cat >resources/ReadMe.txt <<EOF
This package installs The cduce library manager ${VERSION}.
You need Mac OS X 10.4.x (Tiger).
Files will be installed in the following directories:
/usr/local/bin - command-line executables
/usr/local/lib/ocaml - library and support files
/usr/local/man - manual pages
EOF
chmod -R g-w root
#sudo chown -R root:admin root
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \
-build -p "`pwd`/cduce.pkg" -f "`pwd`/root" -i "`pwd`/Info.plist" \
-d "`pwd`/Description.plist" -r "`pwd`/resources"
size=`du -s cduce.pkg | cut -f 1`
size=`expr $size + 8192`
hdiutil create -sectors $size cduce-rw.dmg
name=`hdid -nomount cduce-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
newfs_hfs -v 'Cduce' $name
hdiutil detach $name
name=`hdid cduce-rw.dmg | grep Apple_HFS | cut -d ' ' -f 1`
if test -d '/Volumes/Cduce'; then
ditto -rsrcFork cduce.pkg "/Volumes/Cduce/cduce.pkg"
cp resources/ReadMe.txt "/Volumes/Cduce/"
else
echo 'Unable to mount the disk image as "/Volumes/Cduce"' >&2
exit 3
fi
open "/Volumes/Cduce"
hdiutil detach $name
rm -rf "cduce-${VERSION}.dmg"
hdiutil convert cduce-rw.dmg -format UDZO -o "cduce-${VERSION}.dmg"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment