| 1 | #!/bin/sh |
|---|
| 2 | # Filename: PBI.SetupScript.sh |
|---|
| 3 | # Place any custom installation code here. |
|---|
| 4 | # This script will be run after your program is extracted into |
|---|
| 5 | # /Programs/<ProgNameVer>/ |
|---|
| 6 | # ${1} is the directory name. |
|---|
| 7 | # ${2} is the username of person performing install. |
|---|
| 8 | # TIP: 'kdialog' should be used for user interaction. |
|---|
| 9 | # To interact with the progress dialog echo these flags: |
|---|
| 10 | # echo 'TOTALSTEPS: <num>' # Set the total steps of the progress bar |
|---|
| 11 | # echo 'SETSTEPS: <num>' # Set the current progress of the progress bar |
|---|
| 12 | # echo 'MSG: <text>' # Display this text above progress bar |
|---|
| 13 | ######################################### |
|---|
| 14 | |
|---|
| 15 | cd /Programs/${PROGDIR} |
|---|
| 16 | |
|---|
| 17 | # Get the OO base name |
|---|
| 18 | OODIR="`ls -d openoffice.org*`" |
|---|
| 19 | |
|---|
| 20 | # Setup the external links |
|---|
| 21 | ln -s /Programs/${PROGDIR}/${OODIR} /usr/local/${OODIR} |
|---|
| 22 | ln -s /Programs/${PROGDIR}/bin/${OODIR} /usr/local/bin/${OODIR} |
|---|
| 23 | |
|---|
| 24 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-sbase /usr/local/bin/${OODIR}-sbase |
|---|
| 25 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-scalc /usr/local/bin/${OODIR}-scalc |
|---|
| 26 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-sdraw /usr/local/bin/${OODIR}-sdraw |
|---|
| 27 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-setofficelang /usr/local/bin/${OODIR}-setofficelang |
|---|
| 28 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-simpress /usr/local/bin/${OODIR}-simpress |
|---|
| 29 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-smath /usr/local/bin/${OODIR}-smath |
|---|
| 30 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-spadmin /usr/local/bin/${OODIR}-spadmin |
|---|
| 31 | ln -s /Programs/${PROGDIR}/bin/${OODIR}-swriter /usr/local/bin/${OODIR}-swriter |
|---|
| 32 | |
|---|
| 33 | ln -s /Programs/${PROGDIR}/.sbin/sbase /usr/local/bin/sbase |
|---|
| 34 | ln -s /Programs/${PROGDIR}/.sbin/scalc /usr/local/bin/scalc |
|---|
| 35 | ln -s /Programs/${PROGDIR}/.sbin/sdraw /usr/local/bin/sdraw |
|---|
| 36 | ln -s /Programs/${PROGDIR}/.sbin/simpress /usr/local/bin/simpress |
|---|
| 37 | ln -s /Programs/${PROGDIR}/.sbin/smath /usr/local/bin/smath |
|---|
| 38 | ln -s /Programs/${PROGDIR}/.sbin/swriter /usr/local/bin/swriter |
|---|
| 39 | |
|---|
| 40 | # Make sure any old sun.xml mime types are removed |
|---|
| 41 | rm /usr/local/share/mimelnk/application/vnd.sun.xml* |
|---|
| 42 | rm /usr/local/share/mimelnk/application/vnd.star* |
|---|
| 43 | rm /usr/local/share/mimelnk/application/vnd.oasis.opendocument* |
|---|
| 44 | rm /usr/local/share/mimelnk/application/vnd.ms-excel.desktop |
|---|
| 45 | rm /usr/local/share/mimelnk/application/vnd.ms-powerpoint.desktop |
|---|
| 46 | rm /usr/local/share/mimelnk/application/vnd.ms-word.desktop |
|---|