code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is ...
Shell
#!/bin/sh eval `grep '^HPDF_EXTRA_VERSION=' configure.in` case "$HPDF_EXTRA_VERSION" in *-dev) rebuildok=1 ;; *) rebuildok=0 ;; esac cvsclean=0 while test $# -gt 0; do if test "$1" = "--force"; then rebuildok=1 echo "Forcing buildconf" fi if test "$1" = "--clean"; then cvsclean=...
Shell
#!/bin/sh cur=`dirname $0`; test $# -eq 1 || { echo "usage: $0 <gwt directory>" exit 1 } test -d $1 -a -f $1/gwt-dev.jar || { echo "$1 doesn't look like a valid GWT installation" exit 1 } gwt_home=$1 shell_cp=${cur}/src:${cur}/bin:${gwt_home}/gwt-user.jar:${gwt_home}/gwt-dev.jar:theme/minig-theme.jar...
Shell
#!/bin/bash build_version=`svnversion` ant clean dist cd dist jar cvf ../minig-frontend-0.${build_version}.war *
Shell
#!/bin/bash source `whoami`.build.properties rm -fr soyc java -cp ${gwt}/gwt-soyc-vis.jar:${gwt}/gwt-dev-linux.jar com.google.gwt.soyc.SoycDashboard -resources ${gwt}/gwt-soyc-vis.jar -out soyc extra/minig/soycReport/stories0.xml.gz
Shell
rm -fr org mkdir -p org/minig/theme/minig cp -r minig/* org/minig/theme/minig find org -name ".svn" -type d |xargs rm -fr jar cf minig-theme.jar org && rm -fr org
Shell
#!/bin/sh APPDIR=`dirname $0`; java -cp "$APPDIR/src:$APPDIR/bin:${HOME}/java/gwt/gwt-user.jar:${HOME}/java/gwt/gwt-dev.jar" com.google.gwt.i18n.tools.I18NSync -out $APPDIR/src fr.aliasource.webmail.client.lang.Strings -createMessages ;
Shell
#!/bin/bash test $# -eq 3 || { echo "usage: $0 login domain password" exit 1 } function post_data() { http_r=`echo "$1" | \ lynx -post_data -dump http://localhost:8081/$2` } post_data "login=$1&domain=$2&password=$3" firstIndexing.do token=`echo ${http_r} | sed -e 's/.*value="\([^"]*\).*/\1/'` echo -e...
Shell
#!/bin/bash test $# -eq 1 || { echo "usage: $0 <server common name>" exit 1 } cat >> $1_ssl.cnf <<EOF [ req ] default_bits = 2048 encrypt_key = yes distinguished_name = req_dn x509_extensions = cert_type prompt = no [ req_dn ] O=zz.com OU=backend CN=$1 [ cert_type ] nsCertType = server EOF openssl req -ne...
Shell
#!/bin/bash test $# -eq 1 || { echo "usage: $0 <server common name>" exit 1 } cat >> $1_ssl.cnf <<EOF [ req ] default_bits = 2048 encrypt_key = yes distinguished_name = req_dn x509_extensions = cert_type prompt = no [ req_dn ] O=minig.org OU=backend CN=$1 [ cert_type ] nsCertType = server EOF openssl req ...
Shell
#!/bin/bash rm -fr built_archive_test && mkdir built_archive_test pushd built_archive_test >/dev/null 2>&1 tar xfj ../minig-backend-svn-linux.tar.bz2 >/dev/null 2>&1 time ./minig-backend/webmail-backend popd >/dev/null 2>&1 rm -fr built_archive_test
Shell
#!/bin/bash # OBM Webmail Proxy App launcher appid=fr.aliasource.webmail.proxy.proxyapp curdir=`dirname $0` echo -n "equinox shell lib loading..." source ${curdir}/equinox.lib echo "[OK]" aliasource_equinox_profile_server_appid ${curdir} ${appid}
Shell
#!/bin/bash # OBM Webmail Proxy App launcher appid=fr.aliasource.webmail.proxy.proxyapp curdir=`dirname $0` echo -n "equinox shell lib loading..." source ${curdir}/equinox.lib echo "[OK]" aliasource_equinox_run_server_appid ${curdir} ${appid}
Shell
#!/bin/bash test $# -eq 1 || { echo "usage: $0 token" exit 1 } token=$1 function post_data() { http_r=`echo "$1" | \ lynx -post_data -dump http://localhost:8081/$2` } post_data "token=${token}" logout.do
Shell
#!/bin/bash test $# -eq 3 || { echo "usage: $0 db user host" exit 1 } psql=$(which psql) test "$psql" != "" || { echo "psql: not found, please install postgresql-client package" exit 1 } db=$1 user=$2 host=$3 $psql -U ${user} ${db} -h ${host} -f \ create_minig.sql > /tmp/minig.log 2>&1 grep -i error...
Shell
#!/bin/bash rm -fr built_archive_test && mkdir built_archive_test pushd built_archive_test >/dev/null 2>&1 tar xfj ../minig-backend-svn-linux.tar.bz2 >/dev/null 2>&1 time ./minig-backend/webmail-backend-profile popd >/dev/null 2>&1 rm -fr built_archive_test
Shell
#!/bin/bash test $# -eq 2 || { echo "usage: $0 login@domain password" exit 1 } function post_data() { http_r=`echo "$1" | \ lynx -post_data -dump http://localhost:8081/$2` } post_data "login=$1&password=$2" regenerateSieve.do echo ${http_r}
Shell
#!/bin/bash # Author: Thomas Cataldo <tcataldo@minig.org> # # Uses an headless eclipse to build ${product_name} # # # user build settings should be put in # `whoami`.product_build.properties set -e set -x pbuild_dir=`dirname $0` pushd $pbuild_dir >/dev/null 2>&1 ## USER VARS: The only user settable variables in this ...
Shell
#!/bin/bash # ### BEGIN INIT INFO # Provides: minig-backend # Required-Start: $syslog $network # Required-Stop: $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: MiniG Backend. # Description: init system for minig-backend. Starts the equinox server # process with minig ...
Shell
#!/bin/bash # This script does a complete reset of minig backend and solr indexes /etc/init.d/minig-backend stop /etc/init.d/obm-tomcat stop rm -fr /var/lib/minig-backend/org.* rm -fr /var/cache/minig/webmail_cache/* rm -fr /var/solr/webmail/data/index /etc/init.d/obm-tomcat start /etc/init.d/minig-backend start
Shell
#!/bin/bash files=`find . -name '*.java'` add_header_to_file() { file_to_process=$1 first_line=`head -n1 ${file_to_process} > ./test_fl.tmp` grep -q "^package" ./test_fl.tmp should_add=$? test 0 -eq $should_add && { echo "headers should be added to $1" cat header.txt > ./f_with_headers.tmp cat...
Shell
#! /bin/sh if [ "$ICSCROWDAPIKEY" != "" ] then echo "Generating new translation archives" fetch -q -1 -o - http://api.crowdin.net/api/project/ics-openvpn/export?key=$ICSCROWDAPIKEY fi echo "Fetch translation archive" fetch -q http://crowdin.net/download/project/ics-openvpn.zip langtoinclude="de cs ko et fr he ru"...
Shell
OPENVPN_PACKAGE_NAME="@PACKAGE_NAME@" OPENVPN_PACKAGE_TARNAME="@PACKAGE_TARNAME@" OPENVPN_PACKAGE_VERSION="@PACKAGE_VERSION@" OPENVPN_PACKAGE_HOST="@host@"
Shell
#!@SHELL@ # # run OpenVPN client against ``test reference'' server # - check that ping, http, ... via tunnel works # - check that interface config / routes are properly cleaned after test end # # prerequisites: # - openvpn binary in current directory # - writable current directory to create subdir for logs # - t_client...
Shell
#! /bin/sh # # t_lpback.sh - script to test OpenVPN's crypto loopback # Copyright (C) 2005 Matthias Andree # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, o...
Shell
#! /bin/sh # # t_cltsrv.sh - script to test OpenVPN's crypto loopback # Copyright (C) 2005, 2006, 2008 Matthias Andree # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of th...
Shell
#! /bin/sh echo "${role}:${signal}" >&3
Shell
#!/bin/sh # # Bring up vpn routing. # calculate the network address remote_network=`ipcalc -n "$remote"/"$remote_netmask_bits"` remote_network="${remote_network#*=}" # add the stuff that doesn't change if it's not already there grep -q '^202 ' /etc/iproute2/rt_tables if [ "$?" -ne 0 ] then echo 202 vpn.out >> /e...
Shell
#!/bin/sh # # Bring down vpn routing. # calculate the network address remote_network=`ipcalc -n "$remote"/"$remote_netmask_bits"` remote_network="${remote_network#*=}" # clear routing via VPN ip route del "$remote_network"/"$remote_netmask_bits" via "$5" table vpn.out ip route del table vpnonly.out via "$5" iptabl...
Shell
#!/bin/sh # Sample script to perform OCSP queries with OpenSSL # given a certificate serial number. # If you run your own CA, you can set up a very simple # OCSP server using the -port option to "openssl ocsp". # Full documentation and examples: # http://www.openssl.org/docs/apps/ocsp.html # Edit the following val...
Shell
#!/bin/sh # Copyright (c) 2005-2010 OpenVPN Technologies, Inc. # Licensed under the GPL version 2 # First version by Jesse Adelman # someone at boldandbusted dink com # http://www.boldandbusted.com/ # PURPOSE: This script automatically sets the proper /etc/resolv.conf entries # as pulled down from an OpenVPN server....
Shell
#!/bin/sh # Copyright (c) 2005-2010 OpenVPN Technologies, Inc. # Licensed under the GPL version 2 # First version by Jesse Adelman # someone at boldandbusted dink com # http://www.boldandbusted.com/ # PURPOSE: This script automatically removes the /etc/resolv.conf entries previously # set by the companion script "cl...
Shell
#!/bin/sh #################################### # Tear Down Ethernet bridge on Linux #################################### # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged together tap="tap0" ifconfig $br down brctl delbr $br for t in $tap; do openvpn --rmtun --dev $t done
Shell
#!/bin/sh ################################# # Set up Ethernet bridge on Linux # Requires: bridge-utils ################################# # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap0" # Define physical ethernet interface to be bridged...
Shell
#!/bin/sh route add -net 10.0.0.0 netmask 255.255.255.0 gw $5
Shell
#!/bin/sh # stop all openvpn processes killall -TERM openvpn
Shell
#!/bin/sh # A Sample OpenVPN-aware firewall. # eth0 is connected to the internet. # eth1 is connected to a private subnet. # Change this subnet to correspond to your private # ethernet subnet. Home will use HOME_NET/24 and # Office will use OFFICE_NET/24. PRIVATE=10.0.0.0/24 # Loopback address LOOP=127.0.0.1 # De...
Shell
#!/bin/sh # A sample OpenVPN startup script # for Linux. # openvpn config file directory dir=/etc/openvpn # load the firewall $dir/firewall.sh # load TUN/TAP kernel module modprobe tun # enable IP forwarding echo 1 > /proc/sys/net/ipv4/ip_forward # Invoke openvpn for each VPN tunnel # in daemon mode. Alternative...
Shell
#!/bin/sh route add -net 10.0.1.0 netmask 255.255.255.0 gw $5
Shell
#!/bin/sh # # Build an OpenVPN plugin module on *nix. The argument should # be the base name of the C source file (without the .c). # # This directory is where we will look for openvpn-plugin.h CPPFLAGS="${CPPFLAGS:--I../../../include}" CC="${CC:-gcc}" CFLAGS="${CFLAGS:--O2 -Wall -g}" $CC $CPPFLAGS $CFLAGS -fPIC -...
Shell
#!/bin/sh # # Build an OpenVPN plugin module on *nix. The argument should # be the base name of the C source file (without the .c). # # This directory is where we will look for openvpn-plugin.h CPPFLAGS="${CPPFLAGS:--I../../..}" CC="${CC:-gcc}" CFLAGS="${CFLAGS:--O2 -Wall -g}" $CC $CPPFLAGS $CFLAGS -fPIC -c $1.c &...
Shell
#!/bin/sh # # Build an OpenVPN plugin module on *nix. The argument should # be the base name of the C source file (without the .c). # # This directory is where we will look for openvpn-plugin.h CPPFLAGS="${CPPFLAGS:--I../../..}" CC="${CC:-gcc}" CFLAGS="${CFLAGS:--O2 -Wall -g}" $CC $CPPFLAGS $CFLAGS -fPIC -c $1.c &...
Shell
#!/bin/sh # # openvpn This shell script takes care of starting and stopping # openvpn on RedHat or other chkconfig-based system. # # chkconfig: 345 24 76 # # description: OpenVPN is a robust and highly flexible tunneling application \ # that uses all of the encryption, authentication, a...
Shell
#!/bin/sh ### BEGIN INIT INFO # Provides: openvpn # Required-Start: $network # Required-Stop: $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: This shell script takes care of starting and stopping OpenVP...
Shell
#!/bin/sh # # CA - wrapper around ca to make it easier to use ... basically ca requires # some setup stuff to be done before you can use it and this makes # things easier between now and when Eric is convinced to fix it :-) # # CA -newca ... will setup the right stuff # CA -newreq ... will generate a certific...
Shell
#!/bin/bash # # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
Shell
#!/bin/sh if [ "$1" = "" ]; then key=../apps/server.pem else key="$1" fi if [ "$2" = "" ]; then cert=../apps/server.pem else cert="$2" fi ssltest="adb shell /system/bin/ssltest -key $key -cert $cert -c_key $key -c_cert $cert" if adb shell /system/bin/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key...
Shell
#!/bin/bash # # Copyright (C) 2010 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
Shell
#!/bin/sh /bin/rm -f mttest purify cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#!/bin/sh /bin/rm -f mttest cc -p -DSOLARIS -I../../include -g mttest.c -o mttest -L/usr/lib/libc -ldl -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#!/bin/sh # # build using pthreads where it's already built into the system # /bin/rm -f mttest gcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto -lpthread
Shell
#!/bin/sh # # build using pthreads # # http://www.mit.edu:8001/people/proven/pthreads.html # /bin/rm -f mttest pgcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto
Shell
#!/bin/sh /bin/rm -f mttest cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#!/bin/bash # # Copyright (C) 2009 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
Shell
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2010-11-15.09; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software # Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it un...
Shell
#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@g...
Shell
# Generated from ltmain.m4sh. # libtool (GNU libtool) 2.2.10 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. T...
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-04-16.09; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms o...
Shell
#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 # Free Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you ...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free softw...
Shell
#!/bin/sh # py-compile - Compile a Python program scriptversion=2009-04-28.21; # UTC # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
Shell
#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2011 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # This file is fre...
Shell
#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2010-02-06.18; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007, 2009, 2010 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it a...
Shell
#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is ...
Shell
#! /bin/sh set -e # # usage: util/overlap.sh [directory] # # This script runs the overlap example program on a complete directory tree. # # Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer # OVERLAP="overlap" test -x ./examples/overlap && OVERLAP="./examples/overlap" test -x ./overlap.exe && OVERLAP="./o...
Shell
#! /bin/sh set -e # # usage: util/checkasm.sh [directory] # # This script runs lzotest with all assembler decompressors # on a complete directory tree. # It is not suitable for accurate timings. # # Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer # LZOTEST="lzotest" test -x ./lzotest/lzotest && LZOTEST=...
Shell
#! /bin/sh set -e # # usage: util/check.sh [directory] # # This script runs lzotest with all algorithms on a complete directory tree. # It is not suitable for accurate timings. # # Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer # LZOTEST="lzotest" test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest...
Shell
#! /bin/bash # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU lzo 2.03) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # ...
Shell
#! /bin/sh # vi:ts=4:et # Copyright (C) 1996-2011 Markus F.X.J. Oberhumer rm -f *.o liblzo2.a dict.out lzopack.out precomp.out precomp2.out simple.out lzotest.out testmini.out true
Shell
#! /bin/sh # vi:ts=4:et set -e echo "// Using GNU C compiler." echo "//" test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. UNAME_MACHINE=unknown CC="gcc -fPIC" CC="gcc -static" CC="gcc" CFLAGS="-Wall -O2 -fomit-frame-pointer" # delete the next line to disable assembler support UNAME_MACHINE...
Shell
#! /bin/sh # vi:ts=4:et set -e echo "// Copyright (C) 1996-2011 Markus F.X.J. Oberhumer" echo "//" echo "// Generic Posix/Unix system" echo "// Generic C compiler" test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. test "X${AR}" = X && AR="ar" test "X${CC}" = X && CC="cc" test "X${CFLAGS+...
Shell
#! /bin/sh # vi:ts=4:et test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. LZO_CFG_FREESTANDING=1 . $top_srcdir/B/generic/build.sh
Shell
ndk-build APP_API=all -j 8 if [ $? = 0 ]; then cd libs mkdir -p ../assets for i in * do cp -v $i/minivpn ../assets/minivpn.$i done # Removed compiled openssl libs, will use platform so libs # Reduces size of apk rm -v */libcrypto.so */libssl.so fi
Shell
#!/bin/bash # script for gunicorn control. # $0 [options] PATH_WPPWEB=`dirname $0` LOGDIR=log LOGPATH=$PATH_WPPWEB/$LOGDIR [ -d $LOGPATH ] || mkdir -p $LOGPATH WPPLOGFILE=wpp.log WPP_LOG=/dev/null #WPP_LOG=$LOGDIR/$WPPLOGFILE PFILE=/tmp/gunicorn.pid GU=gunicorn W_MH="egg:meinheld#gunicorn_worker" W_GE="egg:gunicorn#...
Shell
#!/bin/bash # colorizing wpp tail -f log. # Usage: $0 <logfile> OPT_TYPE="ONLINE" if [ $# = 1 ]; then WPP_LOG=$1 else WPP_LOG=~/tmp/log/wpp.log #OPT_TYPE=ONLINE fi WPP_ROOT=~/wpp WPP_COLORIZE=$WPP_ROOT/wpp/util/colorize OPT_ERRINFO=-u18:ERROR OPT_POSERR=+l71:ErrCode=\\\"102\\\" OPT_UA=+l34:UserAgent=...
Shell
#!/bin/bash # 1)filtering out NaN cols. # 2)del cols /wo lat/lon, assign h to 0 when it's null when lat/lon are available. # 3)del cols /wo wlan macs or rsss. #awk -F'\",\"' ' awk -F, ' BEGIN { OFS="," } { if (NF == 16){ ilat=12; ilon=13; ih=14; imac=15; irss=16 }else if (NF == 14){ ilat=9...
Shell
#!/bin/bash # picking up test cases(lines) from reqreterr($1) which have different pos/err results between cpp/python. awk -F, ' BEGIN { OFS="," } { ep_cpp_py = $15; ee_cpp_py = $16 if (ep_cpp_py > 10 || ee_cpp_py > 10){ print #print $1,$2,ep_cpp_py } } ' $1 |grep -v 'NaN'
Shell
#!/bin/bash # $0 <moto bad csv> # moto sometime has only 13 col with height info omitted. # e.g. # alexy@x200:~/wlan-pos$ ./tool/correct_motodata dat/fpp_rawdata/moto/fpp_rawdata_moto_20101015.csv > tmp1.csv awk -F, 'BEGIN{OFS=","}{if(NF==13) $10=$10",";print}' $1
Shell
#!/bin/bash #usage: basename [OPTION], use '-h/--help' for more info. VER=0.1 # Default init aio=0 start_spid=1 stop_spid=1 runtimes=60 fakegps=0 makepyc=0 nstop=0 stabtest=0 stabtest_times=50 log_analysis=0 pathout=log/out patherr=log/err online="python online.py" offline="python offline.py" Version () { cat <...
Shell
#!/bin/bash logs=$* if [ "$logs" == "" ]; then logdir=~/tmp/log logfiles=wpp.log* logs=$logdir/$logfiles fi hits_tot=`grep 'PosReq' $logs |wc -l` hits_fail=`grep 'ErrCode="102"' $logs |wc -l` rate_ok=`echo "scale=4;($hits_tot-$hits_fail)/$hits_tot*100" |bc` echo "positioning success rate: ${rate_ok}%, tota...
Shell
#!/bin/bash # update soft links for req/ret.csv. [ "$1" = "" ] && ( echo -e "\nType: $0 <tagname>\n"; exit 99 ) tag=$1 path="$PWD/dat/fpp_rawdata/cmri" reqlnk=$path/req.csv retlnk=$path/ret.csv reqnew=$path/req_$tag.csv retnew=$path/ret_$tag.csv echo "removing old links..." echo $reqlnk echo $retlnk rm $reqlnk $retln...
Shell
#!/bin/bash # blog deploy. server_ip=192.168.109.58 remote_dir=/usr/local/nginx/html/blog sphinx_book_dir=/home/alexy/downloads/site/writing_a_book_with_sphinx remote_dir_sphinxbook=$remote_dir/sphinx_book #read -s -p "Enter $server_ip password: " inputline #pwd_remote="$inputline" pwd_remote="password" echo echo -n...
Shell
#!/bin/bash req_packs=\ "\ ConcurrentLogHandler==0.8.4 SQLAlchemy==0.7.1 gunicorn==0.12.2 lxml==2.3 meinheld==0.4.13 netifaces==0.4 numpy==1.6.0 progressbar==2.3 psycopg2==2.4.2 simplejson==1.9.2\ " num_packs=`echo $req_packs |awk -F== '{print NF}'` num_packs=$(($num_packs - 1)) echo "-------[$num_packs] packages:---...
Shell
#!/bin/bash max_interv=4 while true do python yc.py #delay=$[ $RANDOM%$max_interv ] #echo $delay #sleep $delay done
Shell
#!/bin/bash # $0 <csv> # e.g. # alexy@x200:~/wlan-pos$ ./tool/hide_coords dat/fpp_rawdata/moto/fpp_rawdata_moto_20101015.csv > tmp1.csv # 16col #awk -F, 'BEGIN{OFS=","}{$12="";$13="";$14="";print}' $1 # 14col awk -F, 'BEGIN{OFS=","}{$9="";$10="";$11="";print}' $1
Shell
#!/bin/bash # picking up data respectively for request and db. awk -F, ' BEGIN { OFS="," pick_req=0 } { if (pick_req == 1){ print >> "req.csv" pick_req = 0 }else{ print >> "db.csv" pick_req = 1 } } ' $1
Shell
#!/bin/bash # $0 <source html> grep 'nbsp;' $1 |grep '<br>' |sed 's/<br>/\n/g' |sed 's/span class="content">/\n/g' |grep -v content |grep -v span |sed 's/&nbsp;//g' |sed 's/ /,/g' > area_code_name_cn.csv
Shell
#!/bin/bash # connect remote bluetooth serial port device. bt_dev_name=yxt-e71 btinit=/etc/init.d/bluetooth btkeyword=bluetooth btcomportid=0 btcomport=rfcomm$btcomportid btcomdev=/dev/$btcomport if [ "`which pskill`" = "" ]; then haspskill=0 btprocess=`ps aux|grep $btkeyword |grep -v 'grep' |awk '{print $N...
Shell
#!/bin/bash # MUST be executed at the wpp ROOT dir. # e.g. $cd /path/to/wpp; ./wpp/util/src_lines sum_py=0 pyfiles=`find . -name '*.py'` echo '----------python------------' for pyfile in $pyfiles do l=`wc -l $pyfile| awk '{print $1}'` printf "%-40s%5d\n" $pyfile $l sum_py=$(($sum_py+$l)) done sum_bash=0...
Shell
#!/bin/bash #usage: test basic cases in config.py for online algos. VER=0.1 Version () { cat <<VER GNU `basename $0` version $VER, by Yan Xiaotian Built on i686-ubuntu-linux-gnu Copyright (C) `date +%Y` Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warran...
Shell
#!/bin/bash sqlterm=psql SHP2SQL=shp2pgsql # shape file to sql converter opt_srs="-s 4326" # spatial reference system, default: EPSG 4326(i.e. WGS84) SCHEMA=gis_schema # gis schema for gistemplate in postgis dbhost=localhost dbname=gisdb dbuser=gis pathout=log/out patherr=log/err #flow control args fc_shp2sql=0 f...
Shell
#!/bin/bash # MUST be executed at WPP root dir. logdir_gunicorn=wpp/web/log logfile_gunicorn=`ls -tr ${logdir_gunicorn}/gunicorn_* |tail -1` numErr=`grep '\[ERROR\]' ${logfile_gunicorn} |wc -l` echo "Found $numErr ERROR(s) in ${logfile_gunicorn}" [ $numErr -eq 0 ] && exit 0 echo -n "Press any key other than *n* to ...
Shell
#!/bin/bash csvfile=$1 awk -F, ' { if($9!="" && $10!="" && $12!="" && $13!=""){ print $9","$10","$12","$13 } }' $csvfile |sed '/^$/d' |uniq > cells_latlon.csv
Shell
#!/bin/bash # Convert old rmp csv format to fpp-compatible 14 or 16-field format. # rmp format: spid 0,lat 1,lon 2,macs 3,rsss 4 # $0 <rmp csv with old format> # # FIELD 14col,16col # IMEI 0, 3 # IMSI 1, 4 # UA 2, 5 # MCC 3, 6 # MNC 4, 7 # LAC 5, 8 # CI ...
Shell
#!/bin/bash # split input data to be two parts: more & less. loop=$1 datin=$2 picktool=/home/alexy/wlan-pos/tool/datpick_req-db datmore=incr.csv datless=db.csv #datmore=db.csv #datless=incr.csv req=req.csv datall=$datin.tmp rm -f $datmore $datless cp -f $datin $datall for i in $(seq $loop) do $picktool $datall if...
Shell
#!/bin/bash maxmacs_num=4 #maxmacs_num=all for f in $* do if [ "$maxmacs_num" = "all" ]; then declare -a uniq_macs=`awk -F, '{print $4}' $f |uniq` declare -a uniq_essid=`awk -F, '{print $6}' $f |uniq` elif [ $maxmacs_num -eq 4 ]; then declare -a uniq_macs=`awk -F, '{print $4}' $f |awk -F'|' '{print $1"|"$2"|"...
Shell
#!/bin/bash opt=$1 target_files=~/tmp/log/wpp.log* #day_str="2 days ago" day_str="now" #mon_str="1 month ago" mon_str="now" day_end=`date -d "$day_str" "+%d"` if [ "$opt" == "today" ]; then #just for today. day_start=$day_end date_today=`date +%Y-%m-%d` target_files=`ls $target_files -tr --full-time |grep ...
Shell
#!/bin/bash # $0 <total reqs> <concurrent reqs> <target id> Usage() { thisfile=`basename $0` cat <<HELP $thisfile -- Apache Benchmark wrapper for FPP/WPP performance testing. USAGE: $thisfile <total reqs> <concurrent reqs> <target server id> <target server id>: 1 - WPP Python 2 - FPP neusoft 3 - WPP Vance 4 - FPP...
Shell
#!/bin/bash VENV_HOME=/opt/wpp WPP_HOME=$VENV_HOME/src/wpp LOGDIR=$WPP_HOME/log/area . $VENV_HOME/bin/activate datetime=`date +%Y-%m%d` timestamp=`date +%Y-%m%d-%H%M%S` thisfilename=`basename $0 |awk -F. '{print $1}'` task_banner="\n========= TASK:$thisfilename WAKEUP@$timestamp ========" [ -d $LOGDIR ] || mkdir -p...
Shell
#!/bin/bash VENV_HOME=/opt/wpp WPP_HOME=$VENV_HOME/src/wpp LOGDIR=$WPP_HOME/log . $VENV_HOME/bin/activate datetime=`date +%Y-%m%d` timestamp=`date +%Y-%m%d-%H%M%S` thisfilename=`basename $0 |awk -F. '{print $1}'` task_banner="\n========= TASK:$thisfilename WAKEUP@$timestamp ========" [ -d $LOGDIR ] || mkdir -p $LOG...
Shell