tracker-friendly install script

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2003-12-22 22:17:38 +00:00
parent 77611e5145
commit 51fe1be4f7

View File

@ -2099,9 +2099,28 @@ rule PackageInstallScript
actions together PackageInstallScript
{
echo "#!/bin/sh" > $(1) ;
echo "unzip -d / install.zip" >> $(1) ;
echo '#!/bin/sh
base=`dirname "$0"`
cd $base
if [ -n "$TTY" ]
then
unzip -d / install.zip
else
response=`alert "Would you like to automatically overwrite existing files, or receive a prompt?" "Overwrite" "Prompt"`
if [ $response == "Overwrite" ]
then
unzip -od / install.zip
alert "Finished installing" "Thanks"
else
if [ -e /boot/beos/apps/Terminal ]
then
terminal=/boot/beos/apps/Terminal
else
terminal=`query Terminal | head -1`
fi
$terminal -t "installer" /bin/sh $0
fi
fi' > $(1) ;
chmod 755 $(1) ;
}