You are not logged in.
Pages: 1
I need to replace the line:
JAVA=`which java`
with
JAVA=/opt/java/jre/bin/java
In the file "buddi" (it's a shell script) but the sed line doesn't appear to be working? ![]()
Any help would be great ![]()
pkgname=Buddi
pkgver=3.2.2.5
pkgrel=1
pkgdesc="Personal finance and budgeting program, aimed at those who have little or no financial background."
arch=( i686 x86_64 )
url="http://buddi.thecave.homeunix.org/en/"
license=('GPL')
depends=('jre')
install=
source=(http://transact.dl.sourceforge.net/sourceforge/buddi/$pkgname-$pkgver.tgz)
md5sums=('946aed15ae20244bd4339bdaa61604ad')
build() {
echo "$srcdir/$pkgname"
cd "$srcdir/$pkgname"
mkdir -p "$pkgdir/usr/bin/" || exit 1
sed -i 's/JAVA=\`which java\`/JAVA=\/opt\/java\/jre\/bin\/java/g' buddi
cp buddi "$pkgdir/usr/bin/"
cp Buddi.jar "$pkgdir/usr/bin/"
}Last edited by fukawi2 (2008-12-31 08:12:28)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
You actually want to use "${JAVA_HOME}/bin/java"
sed -i "s#JAVA=\`which java\`#JAVA=\${JAVA_HOME}/bin/java#" buddiOffline
Thanks Allan ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Where does ${JAVA_HOME} come from? The sed line worked, and the line is replaced properly, but I get this when I try to run buddi:
$ buddi
I cannot find your Java executable. Please set the JAVA variable in this script.
Which comes from this in the bash script:
# Check if Java is installed.
if [ ! -x ${JAVA} ]; then
echo "I cannot find your Java executable. Please set the JAVA variable in this script."
exit 1
fiAre you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
All java runtimes (jre, openjdk6, ...) should set this varaible in their boot up script in /etc/profile.d/<packgae>.sh
Edit: also your papckage should probably depend on java-runtime instead of jre.
Offline
Thanks again Allan - I'll give that a try ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Edit: also your papckage should probably depend on java-runtime instead of jre.
What's the general rule of thumb on this? If something runs under jre/openjdk6 but not java-gcj-compat, should it still depend on java-runtime?
Up until now, I've just been using jre since pacman seems to grab java-gcj-compat first.
Last edited by tdy (2009-01-05 07:07:55)
Offline
Pages: 1