Commit b645f0a863526aea6bc3b7f61163e337eba0d3bd
- Diff rendering mode:
- inline
- side by side
distributions/Fedora_12
(13 / 0)
|   | |||
| 17 | 17 | ||
| 18 | 18 | echo -n "Copying files ..." | |
| 19 | 19 | ||
| 20 | # Has the user used the regular install.sh script which called this file or | ||
| 21 | # has he executed this script directly? | ||
| 22 | if [ -z "$INSTDIR" ]; then | ||
| 23 | echo "Error: Don't use this file directly, use install.sh instead!" | ||
| 24 | exit -1 | ||
| 25 | fi | ||
| 26 | |||
| 20 | 27 | mkdir $INSTDIR | |
| 21 | 28 | cp -r ./files/* $INSTDIR/ | |
| 22 | 29 | chmod +x $INSTDIR/bin/pappi | |
| … | … | ||
| 40 | 40 | fi | |
| 41 | 41 | if [ ! -d "$APPDB" ]; then | |
| 42 | 42 | mkdir -p $APPDB | |
| 43 | fi | ||
| 44 | |||
| 45 | # Does the Mime-File already exist? remove! | ||
| 46 | if [ -f "$MIMEDB/$MIMEFILE" ]; then | ||
| 47 | echo "Mime file already exist. removing..." | ||
| 48 | rm "$MIMEDB/$MIMEFILE" | ||
| 43 | 49 | fi | |
| 44 | 50 | ||
| 45 | 51 | echo '<?xml version="1.0" encoding="UTF-8"?>' >> $MIMEDB'/'$MIMEFILE |
distributions/Ubuntu_9.10
(4 / 68)
|   | |||
| 9 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 10 | 10 | # GNU General Public License for more details. | |
| 11 | 11 | # ============================================================================== | |
| 12 | # (C) 2009 Christian Beuschel <chris109(at)web.de> | ||
| 12 | # (C) 2010 Maximilian Seesslen <mes(at)seesslen.net> | ||
| 13 | 13 | ||
| 14 | 14 | # Installation | |
| 15 | 15 | ||
| 16 | echo " " | ||
| 17 | |||
| 18 | echo -n "Copying files ..." | ||
| 19 | |||
| 20 | mkdir $INSTDIR | ||
| 21 | cp -r ./files/* $INSTDIR/ | ||
| 22 | chmod +x $INSTDIR/bin/pappi | ||
| 23 | chmod +x $INSTDIR/bin/uninstall | ||
| 24 | ln -s $INSTDIR/bin/pappi /usr/local/bin/pappi | ||
| 25 | |||
| 26 | echo '... done' | ||
| 27 | echo " " | ||
| 28 | |||
| 29 | echo -n "Registering mime-types ..." | ||
| 30 | |||
| 31 | if [ ! -d "$MIMEDB" ]; then | ||
| 32 | mkdir -p $MIMEDB | ||
| 33 | fi | ||
| 34 | if [ ! -d "$APPDB" ]; then | ||
| 35 | mkdir -p $APPDB | ||
| 36 | fi | ||
| 37 | |||
| 38 | echo '<?xml version="1.0" encoding="UTF-8"?>' >> $MIMEDB'/'$MIMEFILE | ||
| 39 | |||
| 40 | echo '<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">' >> $MIMEDB'/'$MIMEFILE | ||
| 41 | echo ' <mime-type type="application/x-personal-application-package">' >> $MIMEDB'/'$MIMEFILE | ||
| 42 | echo ' <comment>Personal Application Package</comment>' >> $MIMEDB'/'$MIMEFILE | ||
| 43 | echo ' <glob pattern="*.pappp"/>' >> $MIMEDB'/'$MIMEFILE | ||
| 44 | echo ' <generic-icon name="package-x-generic"/>' >> $MIMEDB'/'$MIMEFILE | ||
| 45 | echo ' </mime-type>' >> $MIMEDB'/'$MIMEFILE | ||
| 46 | |||
| 47 | echo ' <mime-type type="application/x-personal-application-store-trust-file">' >> $MIMEDB'/'$MIMEFILE | ||
| 48 | echo ' <comment>Personal Application Store Trust File</comment>' >> $MIMEDB'/'$MIMEFILE | ||
| 49 | echo ' <glob pattern="*.pappst"/>' >> $MIMEDB'/'$MIMEFILE | ||
| 50 | echo ' <generic-icon name="package-x-generic"/>' >> $MIMEDB'/'$MIMEFILE | ||
| 51 | echo ' </mime-type>' >> $MIMEDB'/'$MIMEFILE | ||
| 52 | |||
| 53 | echo '</mime-info>' >> $MIMEDB'/'$MIMEFILE | ||
| 54 | |||
| 55 | if [ ! -f $APPDB/$APPLIST ]; then | ||
| 56 | echo "[Default Applications]" > $APPDB/$APPLIST | ||
| 57 | fi | ||
| 58 | echo "application/x-personal-application-package=pappi_install.desktop" >> $APPDB/$APPLIST | ||
| 59 | echo "application/x-personal-application-store-trust-file=pappi_trust.desktop" >> $APPDB/$APPLIST | ||
| 60 | |||
| 61 | echo '[Desktop Entry]' >> $APPDB/$APPLINIK_I | ||
| 62 | echo 'Version=1.0' >> $APPDB/$APPLINIK_I | ||
| 63 | echo 'Encoding=UTF-8' >> $APPDB/$APPLINIK_I | ||
| 64 | echo 'Name=Personal App Installer' >> $APPDB/$APPLINIK_I | ||
| 65 | echo 'Terminal=false' >> $APPDB/$APPLINIK_I | ||
| 66 | echo 'Exec=/opt/pappi/bin/pappi -i %U' >> $APPDB/$APPLINIK_I | ||
| 67 | echo 'Icon=/opt/pappi/icons/pappi_48.png' >> $APPDB/$APPLINIK_I | ||
| 68 | echo 'Type=Application' >> $APPDB/$APPLINIK_I | ||
| 69 | |||
| 70 | |||
| 71 | update-mime-database $MIMEBASE | ||
| 72 | |||
| 73 | echo '... done' | ||
| 74 | echo " " | ||
| 75 | |||
| 76 | echo "Installing dependenzies ..." | ||
| 77 | |||
| 78 | apt-get -y install uae wine dosbox zenity | ||
| 79 | |||
| 80 | echo '... done' | ||
| 81 | |||
| 82 | echo 'Installation of pappi complete.' | ||
| 16 | # Ubuntu should be able to use the Debian's installer at this state of | ||
| 17 | # complexity | ||
| 18 | source "Debian_general" |
install.sh
(23 / 8)
|   | |||
| 25 | 25 | ||
| 26 | 26 | # Reading information about the distribution | |
| 27 | 27 | LSB_RELEASE_FILE="/etc/lsb-release" | |
| 28 | LSB_RELEASE_BIN_FILE="/usr/bin/lsb_release" | ||
| 28 | 29 | FEDORA_RELEASE_FILE="/etc/fedora-release" | |
| 29 | 30 | ||
| 30 | 31 | if [ -f $LSB_RELEASE_FILE ]; then | |
| 31 | source $LSB_RELEASE_FILE | ||
| 32 | source $LSB_RELEASE_FILE | ||
| 32 | 33 | elif [ -e $FEDORA_RELEASE_FILE ]; then | |
| 33 | DISTRIB_ID="Fedora" | ||
| 34 | DISTRIB_RELEASE=`rpm -q --qf "%{version}\n" fedora-release` | ||
| 34 | DISTRIB_ID="Fedora" | ||
| 35 | DISTRIB_RELEASE=`rpm -q --qf "%{version}\n" fedora-release` | ||
| 36 | elif [ -f $LSB_RELEASE_BIN_FILE ]; then | ||
| 37 | DISTRIB_ID=$(lsb_release -s -i) | ||
| 38 | # -c gives the codename of the distro, -r would give release number. | ||
| 39 | # Better to use the codename: not interested in having an install script for | ||
| 40 | # every release candidate and every security update of a stable release... | ||
| 41 | DISTRIB_RELEASE=$(lsb_release -s -c) | ||
| 35 | 42 | else | |
| 36 | echo "Error: Installation LSB release file \"$LSB_RELEASE_FILE\" or fedora release file \"$FEDORA_RELEASE_FILE\" has not been found!" | ||
| 37 | exit 1 | ||
| 43 | echo -n "Error: Installation LSB release file \"$LSB_RELEASE_FILE\" " | ||
| 44 | echo "or fedora release file \"$FEDORA_RELEASE_FILE\" has not been found!" | ||
| 45 | exit 1 | ||
| 38 | 46 | fi | |
| 39 | 47 | ||
| 40 | 48 | # Installation | |
| … | … | ||
| 50 | 50 | INSTALLER_DIR="./distributions" | |
| 51 | 51 | SCRIPT=$INSTALLER_DIR'/'$DISTRIB_ID'_'$DISTRIB_RELEASE | |
| 52 | 52 | ||
| 53 | # Are we user 'root'? | ||
| 54 | if [ "$UID" != "0" ]; then | ||
| 55 | echo "Error: You'd better be root in order to install this application!" | ||
| 56 | exit -1 | ||
| 57 | fi | ||
| 53 | 58 | ||
| 54 | 59 | if [ -f $SCRIPT ]; then | |
| 55 | source $SCRIPT | ||
| 60 | source $SCRIPT | ||
| 56 | 61 | else | |
| 57 | echo "Error: Your Distribution or your Version of $DISTRIB_ID is not supported yet. If you are a programmer, help us to support it." | ||
| 58 | exit 1 | ||
| 62 | echo -n "Error: Your Distribution or your Version of " | ||
| 63 | echo -n "$DISTRIB_ID/$DISTRIB_RELEASE is not " | ||
| 64 | echo "supported yet. If you are a programmer, help us to support it." | ||
| 65 | exit 1 | ||
| 59 | 66 | fi | |
| 60 | 67 | ||
| 61 | 68 | exit 0 |

