summaryrefslogtreecommitdiff
path: root/net-p2p/frost/files/wrapper.sh
blob: c5c67e25f5ae4504b695b19d39b153a9593d144f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

PREFIX="%%PREFIX%%"
JAVAVM="%%JAVAVM%%"
JAR_DIR="%%JAR_DIR%%"
JAR_FILE="%%JAR_FILE%%"
SHARE_DIR="%%SHARE_DIR%%"
HOME_DIR=${HOME}/.frost
CLASSPATH="${PREFIX}/${JAR_DIR}/${JAR_FILE}:${PREFIX}/${JAR_DIR}/fecImpl.jar:${PREFIX}/${JAR_DIR}/genChkImpl.jar:${PREFIX}/${JAR_DIR}/xercesImpl.jar:${PREFIX}/${JAR_DIR}/xml-apis.jar:${PREFIX}/${JAR_DIR}/xmlParserAPIs.jar:$CLASSPATH"

if [ ! -d ${HOME_DIR}/config ]
then
	mkdir -p ${HOME_DIR}/config
fi

if [ ! -e ${HOME_DIR}/config/boards.xml.default ]
then
	cp ${PREFIX}/${SHARE_DIR}/boards.xml.default ${HOME_DIR}/config/
fi

cd ${HOME_DIR} &&
	exec ${JAVAVM} -cp $CLASSPATH frost.frost "${@}"