software RE Org anization

Table of Contents

1 Introduction

This paper is part of my Commonplace Book, and as such begins the reorg-anization of my shell function practice. Notably, with two uses of function saving: the cmdlib and the bitbucket

2 Code

2.1 dbsave, the origin for the particular destinations

function dbsave
{ 
    trace_call $*;
    dbsave_old $*;
    pptlog $PWD $* >> ~/lib/dbsave.log
}
function dbsave_old
{ 
    report_notargcount 2 $# lib fun ... && return 1;
    [[ -f $1 ]] || { 
	set $(which $1) $(shift; echo $*);
	report_notfile $1 && return 2
    };
    trace_call $*;
    chmod +w $1;
    foreach nlf $(shift; echo $*) | tee -a $1 $(T);
    chmod -w $1
}

2.2 {cmd,bitbucket}save

function cmdsave
{ 
    report_notargcount 1 $# lib fun ... && return 1;
    f=$(which cmdlib)
    report_notfile $f && return 2
    trace_call f : $*;
    chmod +w $f;
    foreach nlf $* | tee -a $f $(T);
    chmod -w $f
    pptlog $PWD $* >> ~/lib/$(myname).log
}
function bitbucketsave
{ 
    report_notargcount 1 $# lib fun ... && return 1;
    f=$(which bitbucketlib)
    report_notfile $f && return 2
    trace_call f : $*;
    chmod +w $f;
    foreach nlf $* | tee -a $f $(T);
    chmod -w $f
    pptlog $PWD $* >> ~/lib/$(myname).log
}

3 Discuss

Now, a list of funcitons may be immediately shuttled off to either the bitbucket or the cmdlib, and using f2file, one can retrieve an otherwise obsolescent function.

4 Direction

Author: Marty

Created: 2016-05-23 Mon 14:59

Emacs 24.4.1 (Org mode 8.2.10)

Validate