#!/bin/sh
# roxapp wrapper for Audacity - 0.0.1 - Puppian - Sep 12, 2005

if [ "$1" = "-uninstallaudacity" ]
then
	APPDIR=`dirname "$0"`
	cd "$APPDIR"
	APPDIR="`pwd`"
	MSG=`which gxmessage` || MSG=xmessage
	$MSG -buttons "Uninstall:21,Cancel" -center -title "Ticker.app" "Uninstall Audacity:
Are you sure?"
	[ $? -eq 21 ] || exit
	rm -rf /root/my-applications/audacity/
	rm -f /root/my-applications/bin/audacity
	rm -f /usr/share/audacity
	$MSG -center -title "Audacity" "Audacity is uninstalled" &
	exec rm -rf "$APPDIR/"
fi

ln -sf  "/root/my-applications/audacity/share/audacity" /usr/share/audacity

exec audacity "$@"