office/freemind: use a wrapper instead of symlink to launch

Thanks to Vincent Batts.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Bruno T. Russo (BrunoRusso) 2011-02-06 02:38:47 -06:00 committed by Robby Workman
parent 981ba864e3
commit 441e4ab66f
2 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,7 @@
# Slackware build script for freemind
# Copyright 2009 BrunoRusso, Sao Paulo, Brazil
# Copyright 2009,2011 BrunoRusso, Sao Paulo, Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -29,7 +29,7 @@
PRGNAM=freemind
VERSION=${VERSION:-0.8.1}
ARCH=noarch
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRC_VERSION=$(echo $VERSION | tr . _)
@ -46,13 +46,9 @@ mkdir -p $TMP $PKG/opt/$PRGNAM $OUTPUT
cd $TMP
unzip $CWD/freemind-bin-max-$SRC_VERSION.zip -d $PKG/opt/$PRGNAM
# Make a symlink in /usr/bin
# Make a wrapper in /usr/bin
mkdir -p $PKG/usr/bin
cat << EOF > $PKG/usr/bin/$PRGNAM
#!/bin/sh
cd /opt/freemind
./freemind.sh
EOF
cat $CWD/freemind.sh > $PKG/usr/bin/freemind
chmod 0755 $PKG/opt/freemind $PKG/opt/freemind/*.sh $PKG/usr/bin/freemind
# Install desktop file, icon, and mimetype files

View file

@ -0,0 +1,3 @@
#!/bin/sh
export FREEMIND_BASE_DIR="/opt/freemind"
${FREEMIND_BASE_DIR}/freemind.sh ${1+"$@"}