relpipe-data/examples/release-v0.9.sh
branchv_0
changeset 241 f71d300205b7
parent 221 fb8956bb44ec
equal deleted inserted replaced
240:d81c623de788 241:f71d300205b7
       
     1 # Install dependencies as root:
       
     2 su -c "apt install g++ make cmake mercurial pkg-config"
       
     3 su -c "apt install libxerces-c-dev" # needed only for relpipe-in-xml module
       
     4 
       
     5 # Run rest of installation as a non-root user:
       
     6 export RELPIPE_VERSION="v0.9"
       
     7 export RELPIPE_SRC=~/src
       
     8 export RELPIPE_BUILD=~/build
       
     9 export RELPIPE_INSTALL=~/install
       
    10 export PKG_CONFIG_PATH="$RELPIPE_INSTALL/lib/pkgconfig/:$PKG_CONFIG_PATH"
       
    11 export PATH="$RELPIPE_INSTALL/bin:$PATH"
       
    12 
       
    13 rm -rf "$RELPIPE_BUILD"/relpipe-*
       
    14 mkdir -p "$RELPIPE_SRC" "$RELPIPE_BUILD" "$RELPIPE_INSTALL"
       
    15 
       
    16 # Helper functions:
       
    17 relpipe_download() { for m in "$@"; do cd "$RELPIPE_SRC" && ([[ -d "relpipe-$m.cpp" ]] && hg pull -R "relpipe-$m.cpp" && hg update -R "relpipe-$m.cpp" "$RELPIPE_VERSION" || hg clone -u "$RELPIPE_VERSION" https://hg.globalcode.info/relpipe/relpipe-$m.cpp) || break; done; }
       
    18 relpipe_install()  { for m in "$@"; do cd "$RELPIPE_BUILD" && mkdir -p relpipe-$m.cpp && cd relpipe-$m.cpp && cmake -DCMAKE_INSTALL_PREFIX:PATH="$RELPIPE_INSTALL" "$RELPIPE_SRC/relpipe-$m.cpp" && make && make install || break; done; }
       
    19 
       
    20 # Download all sources:
       
    21 relpipe_download lib-protocol lib-reader lib-writer lib-cli lib-xmlwriter in-cli in-fstab in-xml in-csv in-filesystem out-gui.qt out-nullbyte out-ods out-tabular out-xml out-csv tr-cut tr-grep tr-python tr-sed tr-validator
       
    22 
       
    23 # Build and install libraries:
       
    24 relpipe_install lib-protocol lib-reader lib-writer lib-cli lib-xmlwriter
       
    25 
       
    26 # Build and install tools:
       
    27 relpipe_install in-fstab in-cli in-fstab in-xml in-csv tr-cut tr-grep tr-sed out-nullbyte out-ods out-tabular out-xml out-csv
       
    28 
       
    29 # relpipe_install in-filesystem # requires GCC 8 or patching (see below)
       
    30 
       
    31 # Clean-up:
       
    32 unset -f relpipe_install
       
    33 unset -f relpipe_download
       
    34 unset -v RELPIPE_VERSION
       
    35 unset -v RELPIPE_SRC
       
    36 unset -v RELPIPE_BUILD
       
    37 unset -v RELPIPE_INSTALL
       
    38 
       
    39 # View your fstab like on an 80s green screen terminal!
       
    40 relpipe-in-fstab | relpipe-out-tabular