| 1 | #!/bin/sh |
|---|
| 2 | # PBI building script |
|---|
| 3 | # This will run after your port build is complete |
|---|
| 4 | # Build your PBI here, and exit 0 on success, or exit 1 on failure. |
|---|
| 5 | ############################################################################## |
|---|
| 6 | # Available Variables |
|---|
| 7 | # PBIDIR = The location of where you can populate your PBI directory |
|---|
| 8 | # MODULEDIR = The location of the module directory for this PBI |
|---|
| 9 | # PORTVER = Version number of the port we used to build |
|---|
| 10 | ############################################################################## |
|---|
| 11 | |
|---|
| 12 | # Get all the various language files and copy them to the PBI |
|---|
| 13 | LANGFILE="frozenbubble.mo" |
|---|
| 14 | mkdir ${PBIDIR}/locale/ |
|---|
| 15 | cd /usr/local/share/locale |
|---|
| 16 | for i in `ls` |
|---|
| 17 | do |
|---|
| 18 | if [ -e "/usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE}" ] |
|---|
| 19 | then |
|---|
| 20 | mkdir ${PBIDIR}/locale/${i} |
|---|
| 21 | cp /usr/local/share/locale/${i}/LC_MESSAGES/${LANGFILE} ${PBIDIR}/locale/${i}/ |
|---|
| 22 | fi |
|---|
| 23 | done |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | # Setup the perl call at the top of frozen-bubble properly |
|---|
| 27 | sed -e "s,/usr/bin/perl,/Programs/FrozenBubble${PORTVER}/bin/perl,g" ${PBIDIR}/bin/frozen-bubble > /tmp/frozen-bubble |
|---|
| 28 | mv /tmp/frozen-bubble ${PBIDIR}/bin/frozen-bubble |
|---|
| 29 | chmod 755 ${PBIDIR}/bin/frozen-bubble |
|---|
| 30 | |
|---|
| 31 | # Setup the perl call at the top of frozen-bubble properly |
|---|
| 32 | sed -e "s,/usr/bin/perl,/Programs/FrozenBubble${PORTVER}/bin/perl,g" ${PBIDIR}/bin/frozen-bubble-editor > /tmp/frozen-bubble-editor |
|---|
| 33 | mv /tmp/frozen-bubble-editor ${PBIDIR}/bin/frozen-bubble-editor |
|---|
| 34 | chmod 755 ${PBIDIR}/bin/frozen-bubble-editor |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | # Setup the PROGDIR at the top of frozen-bubble.sh properly |
|---|
| 38 | sed -e "s,CHANGEME,FrozenBubble${PORTVER},g" ${PBIDIR}/bin/frozen-bubble.sh > /tmp/frozen-bubble.sh |
|---|
| 39 | mv /tmp/frozen-bubble.sh ${PBIDIR}/bin/frozen-bubble.sh |
|---|
| 40 | chmod 755 ${PBIDIR}/bin/frozen-bubble.sh |
|---|
| 41 | |
|---|
| 42 | # Setup the PROGDIR at the top of frozen-bubble-editor.sh properly |
|---|
| 43 | sed -e "s,CHANGEME,FrozenBubble${PORTVER},g" ${PBIDIR}/bin/frozen-bubble-editor.sh > /tmp/frozen-bubble-editor.sh |
|---|
| 44 | mv /tmp/frozen-bubble-editor.sh ${PBIDIR}/bin/frozen-bubble-editor.sh |
|---|
| 45 | chmod 755 ${PBIDIR}/bin/frozen-bubble-editor.sh |
|---|