#!/bin/bash #--------------------------------------------------------------------- # File information. # File: gip.wrapper.in # Purpose: Single-instance wrapper (Laclin-specific) # License: BSD-style (for this file only) # Revision: 241116 #--------------------------------------------------------------------- # Wrapper parameters. BASEDIR=$PRODTREE/gip XBINDIR=$BASEDIR/xbin TARGET=$XBINDIR/gip PROGNAME="gip" SNDFLAG=false #--------------------------------------------------------------------- # Run the target if it's available. if [ -f $TARGET ]; then # If there are no parameters, start in # user's home directory if [ "x$1" = "x" ]; then cd; fi export HOME=/tmp/gip`id -u` mkdir -p $HOME || exit 1 cat > $HOME/.gtkrc-2.0 << END gtk-icon-theme-name = "Hicolor" gtk-theme-name = "Adwaita" gtk-font-name = "Liberation Sans 15" END if [ "@$SNDFLAG" == "@true" ]; then resetpcmvol # Adjust volume fi if [ -d $LIBDIR ]; then # Adjust LD_LIBRARY_PATH LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH fi PATH=$XBINDIR:$PATH # Adjust PATH /laclin/lacutil/single-instance --wait --usewin \ "^Internet Protocol Calculator\b" \ $TARGET $* & exit fi #--------------------------------------------------------------------- # Display a missing-program dialog. TITLE="$PROGNAME isn't installed" /laclin/lacutil/single-instance \ --wait --usewin "^$TITLE" \ zenity --error --no-wrap --title="$TITLE" --text="$TITLE"