-
Notifications
You must be signed in to change notification settings - Fork 92
/
pg
executable file
·36 lines (31 loc) · 704 Bytes
/
pg
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
34
35
36
#!/usr/bin/env bash
# This file adapts to the VST the 'pg' script distributed with CompCert. -Gordon
# Purpose: start Proof General with the right -I options
# Usage: ./pg [desired-proofgeneral-start-directory]
LOADPATH=`cat .loadpath`
PWD=`pwd`
I=0
pad () {
if [ $I -eq 1 ]
then
if [[ $1 == /* ]]
then
echo -n "\"$1\" "
else
echo -n "\"$PWD/$1\" "
fi
I=0
else
if [[ $1 == -I ]] || [[ $1 == -R ]]
then echo -n "\"$1\" "; I=1
else echo -n "\"$1\" "
fi
fi
}
COQPROGNAME="coqtop"
COQPROGARGS=`for w in $LOADPATH; do pad $w; done`
# if [ $1 ]
# then cd $1
# fi
emacs --eval "(setq coq-prog-name \"$COQPROGNAME\")" \
--eval "(setq coq-prog-args '($COQPROGARGS))" $@ &