freebsd-ports/net/linux-agsatellite/files/wrapper.sh
Mario Sergio Fujikawa Ferreira 7bc2223333 o Fix bug: do not incorrectly use shift from sh(1). First command
line argument was being lost when there was more than 1 argument.
o bump PORTREVISION
2002-01-06 03:05:49 +00:00

23 lines
638 B
Bash

#!/bin/sh
PREFIX="%%PREFIX%%"
PROGRAM="${0}"
if [ ! -d ${HOME}/.agsatellite ]
then
mkdir -p ${HOME}/.agsatellite
fi
if [ ! -h ${HOME}/.agsatellite/${PROGRAM##*/} ]
then
ln -sf ${PREFIX}/bin/${PROGRAM##*/}-real ${HOME}/.agsatellite/${PROGRAM##*/}
fi
echo " ${*} " | grep " \-createdironly " ||
{
cd ${HOME}/.agsatellite &&
echo Running Audio Galaxy Satellite under ${HOME}/.agsatellite &&
echo Create both account.txt and shares.txt files under ${HOME}/.agsatellite &&
exec ./${PROGRAM##*/} ${*} ||
echo PROBLEM. Cannot create directory ${HOME}/.agsatellite, make sure you have the proper permissions to create itnd try again
}