<div dir="ltr"><span style="font-size:13.1999998092651px;line-height:20px">Hi,</span><br style="font-size:13.1999998092651px;line-height:20px"><br style="font-size:13.1999998092651px;line-height:20px"><div style="font-size:13.1999998092651px;line-height:20px">gute Idee, Danke für das Skript. Ich habe es mal getestet, und prinzipiell funktioniert es bis auf ein paar Kleinigkeiten:</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">1. ./install.sh libsml --> klappt einwandfrei</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">2. ./install.sh libjson:</div><div style="font-size:13.1999998092651px;line-height:20px">Ich bekomme folgenden Fehler:</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px"><div>CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/pi/vz/vzlogger/libs/<u></u>json<u></u>-c/missing aclocal-1.14 </div><div>/home/pi/vz/vzlogger/libs/<u></u>json<u></u>-c/missing: line 81: aclocal-1.14: command not found</div><div>WARNING: 'aclocal-1.14' is missing on your system.</div><div>         You should only need it if you modified 'acinclude.m4' or</div><div>         '<a href="http://configure.ac/" target="_blank">configure.ac</a>' or m4 files included by '<a href="http://configure.ac/" target="_blank">configure.ac</a>'.</div><div>         The 'aclocal' program is part of the GNU Automake package:</div><div>         <<a href="http://www.gnu.org/software/automake" target="_blank">http://www.gnu.org/software/<u></u><u></u>automake</a>></div><div>         It also requires GNU Autoconf, GNU m4 and Perl in order to run:</div><div>         <<a href="http://www.gnu.org/software/autoconf" target="_blank">http://www.gnu.org/software/<u></u><u></u>autoconf</a>></div><div>         <<a href="http://www.gnu.org/software/m4/" target="_blank">http://www.gnu.org/software/<u></u><u></u>m4/</a>></div><div>         <<a href="http://www.perl.org/" target="_blank">http://www.perl.org/</a>></div><div>Makefile:462: recipe for target 'aclocal.m4' failed</div><div>make: *** [aclocal.m4] Error 127</div></div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Wenn ich die Skripte (autogen.sh && ...) manuell direkt im Ordner libs/json-c durchlaufen lasse klappt es. Möglicherweise gibt es ein Problem mit pushd und autogen.sh?</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">3. ./install.sh vzlogger</div><div style="font-size:13.1999998092651px;line-height:20px">Fehler:</div><div style="font-size:13.1999998092651px;line-height:20px"><div>Install the project...</div><div>/usr/bin/cmake -P cmake_install.cmake</div><div>-- Install configuration: ""</div><div>-- Installing: /usr/local/share/doc/vzlogger-<u></u><u></u>0-4/README</div><div>CMake Error at cmake_install.cmake:36 (FILE):</div><div>  file INSTALL cannot find "/home/pi/vz/vzlogger/INSTALL"<u></u><u></u>.</div><div>Makefile:65: recipe for target 'install' failed</div><div>make: *** [install] Error 1</div></div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Neben INSTALL wird auch die Datei COPYING in cmake_install.cmake referenziert. Lege ich die beiden Dateien an funktioniert es.</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><div style="font-size:13.1999998092651px;line-height:20px">Gruß</div><div style="font-size:13.1999998092651px;line-height:20px">André</div><div style="font-size:13.1999998092651px;line-height:20px"><br></div><br><div class="gmail_quote">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am So., 1. März 2015 um 13:49 Uhr:</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hallo Zusammen,<br><br></div>ich hab mal versucht ein Skript zu bauen das vzlogger installiert oder- sofern schon vorhanden- aktualisiert. Wäre schön wenn das jemand testen könnte bevor ich es im git einstelle (@Udo: das wäre auch was für Dich ;)<br><br></div>Viele Grüße,<br></div>Andreas<br><br><br>#!/bin/bash<br>#<br># Installer<br>#<br># @copyright Copyright (c) 2015, The <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> project<br># @license <a href="http://www.opensource.org/licenses/gpl-license.php" target="_blank">http://www.opensource.org/<u></u>licenses/gpl-license.php</a> GNU Public License<br># @author Andreas Goetz<br>#<br>##<br># The installer will clone all required repositories or update them if necessary.<br># Then the modules are compiled and installed<br># <br># USAGE:<br># <br>#   Run install.sh from vzlogger or parent folder<br>#   <br>#       ./install.sh<br>#       <br>#   To execute specific parts of the build select which ones to run:<br>#       <br>#       ./install.sh <list of modules> <br>#   <br>#   Modules:<br>#     - vzlogger (libraries must be in place already)<br>#     - libjson<br>#     - libsml<br>#     - clean (will clean the respektive make targets, requires explicitly naming the modules)<br># <br>#     To run a clean build:<br>#     <br>#       ./install.sh vzlogger libjson libsml clean<br>#       <br>##<br># This file is part of <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a><br>#<br># <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a> is free software: you can redistribute it and/or modify<br># it under the terms of the GNU General Public License as published by<br># the Free Software Foundation, either version 3 of the License, or<br># any later version.<br>#<br># <a href="http://volkzaehler.org" target="_blank">volkzaehler.org</a> is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY; without even the implied warranty of<br># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br># along with <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a>. If not, see <<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>><u></u>.<br>##<br><br>set -e<br>shopt -s nocasematch<br><br>##############################<u></u>#<br># some defaults<br>vzlogger_dir=vzlogger<br>lib_dir=libs<br>git_config=.git/config<br><br>##############################<u></u>#<br># functions<br>ask() {<br>    question="$1"<br>    default="$2"<br>    read -e -p "$question [$default] "<br>    REPLY="${REPLY:-$default}"<br>}<br><br>contains() {<br>    [[ $1 =~ $2 ]] && true || false<br>}<br><br>git_is_repo() {<br>    folder="$1"<br>    match="${2-$folder}"<br><br>    if [ -e "$folder/$git_config" ] && grep -q "$match" "$folder/$git_config"; then<br>        true<br>    else<br>        false<br>    fi<br>}<br><br>git_update() {<br>    folder="$1"<br>    git_repo="$2"<br>    match="${3-$folder}"<br>    git_params="${4-}"<br><br>    if git_is_repo $folder $match; then<br>        echo "$folder folder: $(pwd)/$folder"<br>        git_dirty=$(cd $folder; git fetch; git log HEAD.. --oneline)<br>    else<br>        echo "$folder not found"<br>        echo "cloning $folder git repository"<br>        git clone $git_params "$git_repo"<br>    fi<br><br>    if [ -n "$git_dirty" ]; then<br>        echo "updating $folder git repository with remote changes"<br>        pushd $folder<br>            git pull<br>        popd<br>    fi<br>}<br><br><br>##############################<u></u>#<br># header<br>echo "vzlogger installation script"<br><br>##############################<u></u>#<br># check prerequisites<br>echo<br>echo -n "checking prerequisites:"<br><br>deps=( grep pidof git cmake pkg-config autoreconf )<br>for binary in "${deps[@]}"; do<br>    if binpath="$(which $binary)" ; then<br>        echo -n " $binary"<br>    else<br>        echo<br>        echo " $binary: not found. Please install to use this script (e.g. sudo apt-get install $binary)."<br>        exit 1<br>    fi<br>done<br>echo<br><br>##############################<u></u>#<br>echo<br>echo "vzlogger setup..."<br>if [ -n "$1" ]; then<br>    echo "setup modules: $1"<br>fi<br><br>##############################<u></u>#<br>echo<br>echo "checking for vzlogger folder"<br><br>if git_is_repo . vzlogger; then<br>    # move to parent folder<br>    cd ..<br>fi<br><br>if [ -z "$1" ] || contains "$*" vzlogger; then<br>    git_update "$vzlogger_dir" <a href="https://github.com/volkszaehler/vzlogger.git" target="_blank">https://github.com/<u></u>volkszaehler/vzlogger.git</a> vzlogger<br>fi<br><br>pushd "$vzlogger_dir"<br><br>##############################<u></u>#<br>echo<br>echo "checking for libraries"<br><br>if [ ! -d "$lib_dir" ]; then<br>    echo "creating library folder $lib_dir"<br>    mkdir "$lib_dir"<br>fi<br>pushd "$lib_dir"<br><br>    ##############################<u></u>#<br>    # libjson<br>    if [ -z "$1" ] || contains "$*" libjson; then<br>        echo<br>        echo "checking for libjson"<br><br>        git_update json-c <a href="https://github.com/json-c/json-c" target="_blank">https://github.com/json-c/<u></u>json-c</a> json-c "-b json-c-0.12"<br>    fi<br><br>    # libsml<br>    if [ -z "$1" ] || contains "$*" libsml; then<br>        echo<br>        echo "checking for libsml"<br><br>        git_update libsml <a href="https://github.com/volkszaehler/libsml.git" target="_blank">https://github.com/<u></u>volkszaehler/libsml.git</a><br>    fi<br><br><br>    ##############################<u></u>#<br>    echo<br>    echo "building and installing libraries"<br><br>    # libjson<br>    if [ -z "$1" ] || contains "$*" libjson; then<br>        echo<br>        echo "building and installing libjson"<br>        pushd json-c<br>            if [ ! -x ./configure ]; then<br>                sh autogen.sh<br>            fi<br>            if [ ! -e Makefile ]; then<br>                ./configure<br>            else<br>                if contains "$*" clean; then make clean; fi<br>            fi<br><br>            make<br>            sudo make install<br>        popd<br>    fi<br><br>    # libsml<br>    if [ -z "$1" ] || contains "$*" libsml; then<br>        echo<br>        echo "building and installing libsml"<br>        pushd libsml<br>            if contains "$*" clean; then make clean; fi<br><br>            make<br>            sudo cp sml/lib/libsml.* /usr/lib/<br>            sudo cp -R sml/include/* /usr/include/<br>            sudo cp sml.pc /usr/lib/pkgconfig/<br>        popd<br>    fi<br><br>popd<br><br>##############################<u></u>#<br># vzlogger<br>if [ -z "$1" ] || contains "$*" vzlogger; then<br>    echo<br>    echo "building and installing vzlogger"<br><br>    if contains "$*" clean; then<br>        echo "clearing cmake cache"<br>        rm CMakeCache.txt<br>    fi<br><br>    echo "building vzlogger"<br>    cmake .<br>    make<br>    echo "installing vzlogger"<br>    sudo make install<br><br>    if [ -n $(pidof vzlogger) ]; then<br>        echo<br>        echo "vzlogger is already running"<br>        echo "make sure to restart vzlogger"<br>    fi<br>fi<br><br>popd<br><br><br></div>
</blockquote></div></div>