#!/bin/bash #--------------------------------------------------------------------- # File information. # File: avidemux3_qt5.wrapper.in # Purpose: Single-instance wrapper (Laclin-specific) # License: BSD-style (for this file only) # Revision: 211024 #--------------------------------------------------------------------- # Wrapper parameters. BASEDIR=$PRODTREE/avidemux BINDIR=$BASEDIR/bin LIBDIR=$BASEDIR/lib SNDFLAG=true TARGET=$BINDIR/avidemux3_qt5-bridge PROGNAME="avidemux" #--------------------------------------------------------------------- # Run the target if it's available. if [ -f $TARGET ]; then #--------------------------------------------------------------------- cd # Go to user's home directory if [ \! -d .avidemux6 ]; then rm -fr .avidemux6 # Safety measure mkdir .avidemux6 || exit 1 fi cd .avidemux6 || exit 1 if [ \! -f config3 ]; then rm -fr config3 cp -p $BASEDIR/data/config3 . || exit 1 fi #--------------------------------------------------------------------- cd # Go to user's home directory 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=$BINDIR:$PATH # Adjust PATH /laclin/lacutil/single-instance --wait --usepid \ "/bin/avidemux3_qt5\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"