#!/bin/sh clear echo "________________________________________________________________________________" if [ $1 -eq 4 ]; then echo "Anzahl Parameter # $#" echo "Name 0 $0" echo "Parameter 1 1 $1" echo "Parameter 2 2 $2" echo "Alle Parameter @ $@" echo "Alle Parameter * $*" echo "PID $ $$" echo "Rückkehrcode ? $?" echo "________________________________________________________________________________" echo "Value 127 is returned by /bin/sh when the given command is not found within your" echo "PATH system variable and it is not a built-in shell command. In other words, the" echo "system doesn't understand your command, because it doesn't know where to find" echo "the binary you're trying to call." echo "________________________________________________________________________________" exit 4 fi if [ $1 -eq 3 ]; then echo "Parameter Bedeutung" echo " Stiller Modus, nur die notwendigen Informationen" echo "1 Verbose, Ausgabe aller Informationen" echo "2 Nur Ausgabe der Version" echo "3 Diese Hilfe" echo "4 Zusätzliche Informationen" echo "________________________________________________________________________________" exit 3 fi if [ $1 -eq 2 ]; then echo "Prüfen Voraussetzungen Version 0.1 für Willie 4.5.1" echo "________________________________________________________________________________" echo "Author: Heinz Boettjer Kontakt: Heinz.Boettjer@freenet.de" echo "________________________________________________________________________________" echo "This work is licensed under the Creative Commons Attribution-ShareAlike 4.0" echo "International License. To view a copy of this license, visit" echo "http://creativecommons.org/licenses/by-sa/4.0/. Author Heinz Boettjer" echo "________________________________________________________________________________" exit 2 fi if [ $1 -eq 1 ]; then echo "python -V 0 ???" fi python -V > /dev/null 2> /dev/null Status_python=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "pip -V 0 127" echo "Installation: sudo apt-get install python-pip" fi pip -V > /dev/null 2> /dev/null Status_pip=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "sqlite -version 1 127" echo "Installation: sudo apt-get install sqlite libsqlite0" fi sqlite -version > /dev/null 2> /dev/null Status_sqlite=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "mysqlcheck -V 0 127" echo "Installation: sudo apt-get install mysql-client-core-5.6" fi mysqlcheck -V > /dev/null 2> /dev/null Status_mysqlcheck=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "postgres -V 0 127" echo "Installation: sudo apt-get install postgres-xc-client postgres-xc libpq5" echo "Deinstallation: sudo apt-get remove postgres-xc-client postgres-xc libpq5" echo " (Reihenfolge wichtig)" fi postgres -V > /dev/null 2> /dev/null Status_postgres=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "willie-4.5.1.tar.gz 0 1" echo " wget https://pypi.python.org/packages/source/w/willie/willie-4.5.1.tar.gz" fi sudo updatedb locate willie-4.5.1.tar.gz > /dev/null 2> /dev/null Status_willie_1=$? if [ $1 -eq 1 ]; then echo "________________________________________________________________________________" echo "willie installiert ja nein" echo "Installation: sudo pip install willie-4.5.1.tar.gz" echo "Deinstallation: sudo pip uninstall willie" echo "________________________________________________________________________________" if [ -f /usr/local/bin/willie ]; then Status_willie_2="ja"; else Status_willie_2="nein"; fi fi echo "python: $Status_python muss 0 sein" echo "pip: $Status_pip muss 0 sein" echo "sqlite: $Status_sqlite muss 1 sein" if [ $1 -eq 1 ]; then echo "mysqlcheck: $Status_mysqlcheck 0=installiert 127=nicht installiert" echo " egal da dieser Ablauf auf sqlite abgestimmt ist" echo "postgres: $Status_postgres 0=installiert 127=nicht installiert" echo " egal da dieser Ablauf auf sqlite abgestimmt ist" fi echo "willie: $Status_willie_1 0=Download vorhanden" echo "willie installiert: $Status_willie_2" echo "________________________________________________________________________________" if [ $1 -eq 1 ]; then exit 1; else exit 0; fi
This version of the page was edited by Anonymous at 2014-10-12 12:40:50. View the most recent version.