Merge branch 'master' of github.com:seudut/dotfiles
authorPeng Li <seudut@gmail.com>
Wed, 16 Sep 2015 13:10:39 +0000 (21:10 +0800)
committerPeng Li <seudut@gmail.com>
Wed, 16 Sep 2015 13:10:39 +0000 (21:10 +0800)
scripts/change_dylib_path.pl
scripts/cpve_log.pl
scripts/update_cpve.pl
zsh/zshrc

index a615f98..5ab2c9d 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 #
 use strict;
-use warnings;
 #use v5.10;
 
 my @cpve_libs = ( 'libpme.0.dylib', 'libpmexy.1.dylib', 'libpmpxy.1.dylib', 'libtaf.0.dylib', 'libtafxy.1.dylib','libsrtp.dylib' );
index 5a58a12..cb8979d 100755 (executable)
@@ -5,13 +5,22 @@ use warnings;
 use v5.10; ## say
 
 #my $log_file = @ARGV[0];
+#
+# TODO:
+# 1. append cpve version to the file name of full log
+# 2. output critical error of CPVE/PME such as "camera" camera error
+# 3. split the full log as sub logs against the call time
+# 4. plot the RTP stats
 
 my $k_start_call = 'originateCall|answercall';
 #my $k_start_call = 'originateCall';
 
 # create jabber_full.log to add jabber.log, jabber.log.1, jabber.log.2
+my $out_dir = `pwd` . '/out/';
 my @logs = glob "jabber.log*";
-my $full_logs = "jabber_full.log";
+my $full_logs = "$out_dir/jabber_full.log";
+
+#my $cpve_version;
 
 #foreach (@logs) { say; }    
 #say @logs;
@@ -32,14 +41,24 @@ my $full_logs = "jabber_full.log";
 ##}
 
 ## merge log files
-!system "cat $_ >> $full_logs" or die "$!"  for (reverse @logs);
+!system "cat $_ >> $full_logs" or die "$!"  for reverse @logs;
+
+my $version= 
 
+print "===== write done ====\n";
 ## split file  with each call
-open LOG, "<<$full_logs" or die "$!";
+my $call = "call0.log";
 
-open LOG, "<<$full_logs" or die "$!";
+open CALL, ">> $call" or die "$!";
+open LOG, "<", $full_logs or die "$!";
+my $index = 0;
 while(<LOG>){
-
+##    print CALL $_;
+##    last if /originateCall/;
+    if ($_ =~ /originateCall/ ){
+        close 
+        $index = $index+1;
+        open LOG, ">>" "call$index" or die "$!";
+        print LOG $_;
+    }
 }
-
-
index efef836..ae17398 100755 (executable)
@@ -10,8 +10,8 @@ print "-n $options{n}\n" if defined $options{n};
 
 my $ip = (split / /, `ifconfig | grep "inet .*broadcast"`)[1];
 
-my $cpve_dir = '/Users/peli3/CPVE/cpve_trunk/';
-my $ecc_dir = '/Users/peli3/JCC/ecc-p2p/';
+my $cpve_dir = '/Users/peli3-imac/CPVE/cpve_trunk/';
+my $ecc_dir = '/Users/peli3-imac/JCC/ecc-p2p-mac/';
 
 my $ecc_mac_libs = "$ecc_dir/contrib/cpve/lib/darwin/x86_64";
 my $cpve_mac_libs = "$cpve_dir/target/dist/lib/darwin/x86_64";
@@ -40,6 +40,7 @@ else
 
 #### building ecc
 chdir $ecc_dir or die ": $!";
+!system "rm $ecc_dir/contrib/cpve/SConstruct" or die "$!" if -e "$ecc_dir/contrib/cpve/SConstruct";
 !system "python runSconsBuild.py JabberMac64Bit  -j 16  -t no --early_cpve --nofetch"     or die " building ECC failed : $!";
 
 print "copy bin-s bin-c\n";
@@ -58,11 +59,3 @@ close CONF;
 
 
 print "####### DONE #######\n";
-
-#sub get_local_ip{
-#    my @cc = (split / /, `ifconfig | grep "inet .*broadcast"`)[1];
-##    @cc[1]; ## return value
-##    return @cc[1];
-#}
-
-#print CONF "P2P_SERVER_IP=" . &get_local_ip . "\n";
index 9b3fd68..9301e4a 100644 (file)
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -47,17 +47,17 @@ man() {
 
 export PYTHONPATH="/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/"
 export DEV_ENV_ROOT=$HOME/android/
-export ANDROID_NDK_ROOT="${DEV_ENV_ROOT}/android-ndk-r8c/"
+export ANDROID_NDK_ROOT="${DEV_ENV_ROOT}/android-ndk-r10d/"
 export ANDROID_SDK_ROOT="${DEV_ENV_ROOT}/android-sdk-macosx/"
 #export ANDROID_TOOLCHAIN="${DEV_ENV_ROOT}/standalone-toolchain-api14/"
-export ANDROID_NDK_HOME="$HOME/android/android-ndk-r8c"
+export ANDROID_NDK_HOME="$HOME/android/android-ndk-r10d"
 
 
 
 export ANDROID_TOOLCHAIN="$ANDROID_NDK_HOME/standalone-toolchain-api14/"
 
 
-export ANDROID_HOME="/Users/peli3/android/android-sdk-macosx/"
+export ANDROID_HOME="$HOME/android/android-sdk-macosx/"
 
 export PATH=$PATH:"${ANDROID_TOOLCHAIN}/bin/":"${ANDROID_HOME}/platform-tools/"
 export PATH="$HOME/bin":"/usr/local/bin":$PATH
@@ -213,5 +213,21 @@ export ZSHHOME="$HOME/.zsh"
 alias emacs='TERM=xterm-256color emacs -nw'
 
 alias tw='open -a /Applications/TextWrangler.app/'
+
+#
+#function exists { which $1 &> /dev/null }
+#
+#if exists percol; then
+#    function percol_select_history() {
+#        local tac
+#        exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } }
+#        BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
+#        CURSOR=$#BUFFER         # move cursor
+#        zle -R -c               # refresh
+#    }
+#
+#    zle -N percol_select_history
+#    bindkey '^R' percol_select_history
+#fi
 export LANG='en_US.UTF-8'
 export LC_ALL="en_US.UTF-8"