Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on Omnisys stuff.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/omnisys.e>
#           or at <http://angg.twu.net/e/omnisys.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





# «.telemedidas»		(to "telemedidas")
# «.meskita-hd»			(to "meskita-hd")
# «.projects_daniel.tar»	(to "projects_daniel.tar")
# «.NFS»			(to "NFS")
# «.readconfig»			(to "readconfig")
# «.zumbi-wiki-cvs»		(to "zumbi-wiki-cvs")
# «.zumbi-wiki-w2html»		(to "zumbi-wiki-w2html")
# «.telemedidas-docs»		(to "telemedidas-docs")
# «.profsoftdevel»		(to "profsoftdevel")




#####
#
# telemedidas
# 2007dec28
#
#####

# «telemedidas»  (to ".telemedidas")
# (find-angg ".emacs" "telemedidas")
# (find-node "(cvs)Connecting via rsh")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

This is the plan for importing the Telemedidas SCM into the CVS filetree.

Steps:

rm -Rv ~/usrc/telemedidas/
mkdir  ~/usrc/telemedidas/
cd     ~/usrc/telemedidas/
export 'CVSROOT=:ext:edrx@_zumbi:/omnisys/cvsroot'
cvs checkout ihmtelm
cvs checkout cla-telemedidas
cvs checkout CVSROOT

# (find-fline "~/usrc/telemedidas/")
# (code-c-d    "telemedidas" "~/usrc/telemedidas/")
# (code-c-d "clatelemedidas" "~/usrc/telemedidas/cla-telemedidas/")
# (code-c-d        "ihmtelm" "~/usrc/telemedidas/cla-telemedidas/ihmtelm/")

# (find-telemedidasfile "")
# (find-clatelemedidasfile "")
# (find-ihmtelmfile "")
# (find-ihmtelmfile "Makefile")

# (find-ihmtelmfile "")
# (find-ihmtelmfile "tests/")





#####
#
# mounting meskita's HD from linux
# 2007dec28
#
#####

# «meskita-hd»  (to ".meskita-hd")
# (find-sh "dmesg")
# hdb: hdb1
# hdb1: <netbsd: hdb5 hdb6 hdb7 hdb8 hdb9 >

# (find-sh "echo -e 'p\\nq' | sudo fdisk /dev/hdb")
# Fdisk doesn't like NetBSD partitions, but:
# (find-man "mount")
# (find-man "mount" "44bsd")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/hdb5
mkdir /tmp/hdb6
mkdir /tmp/hdb7
mkdir /tmp/hdb8
mkdir /tmp/hdb9
sudo mount -o ro,ufstype=44bsd /dev/hdb5 /tmp/hdb5/
   # mount -o ro,ufstype=44bsd /dev/hdb6 /tmp/hdb6/
sudo mount -o ro,ufstype=44bsd /dev/hdb7 /tmp/hdb7/
sudo mount -o ro,ufstype=44bsd /dev/hdb8 /tmp/hdb8/
sudo mount -o ro,ufstype=44bsd /dev/hdb9 /tmp/hdb9/

# Run "find":
# (find-fline "/tmp/hdbs.lst")

cd /tmp/
sudo find hdb* > /tmp/hdbs.lst

# To umount:

sudo umount /tmp/hdb1
sudo umount /tmp/hdb5
sudo umount /tmp/hdb6
sudo umount /tmp/hdb7
sudo umount /tmp/hdb8
sudo umount /tmp/hdb9





#####
#
# projects_daniel.tar
# 2007dec28
#
#####

# «projects_daniel.tar»  (to ".projects_daniel.tar")

# (find-fline "/tmp/")
# (find-fline "/tmp/hdbs.lst")

# (find-fline "/tmp/hdb7/")
# (find-caramelofile "")
# (find-caramelofile "../../tmp/")
# (find-zumbifile    "../../tmp/")
# (ee-cp "/tmp/hdb7/projects_daniel.tar" (ee-caramelofile "../../tmp/") 'over)
# (ee-cp "/tmp/hdb7/projects_daniel.tar" (ee-zumbifile    "../../tmp/") 'over)

# (find-sh "tar -tvf /tmp/hdb7/projects_daniel.tar")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rf /tmp/projects/
tar -C /tmp/ -xvf /tmp/hdb7/projects_daniel.tar

# (find-fline "/tmp/projects/telemedidas/tlm_doxystyle")





#####
#
# NFS
# 2008jan02
#
#####

# «NFS»  (to ".NFS")
# (find-esgrep "grep -niH -e nfs *.e")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
R

  # From:
  # http://zumbi/devel/index.html
  #
  mkdir /mnt/omnisys.software
  mkdir /mnt/omnisys.backup
  mount zumbi:/omnisys/software /mnt/omnisys.software
  mount zumbi:/omnisys/backup   /mnt/omnisys.backup
  #
  mkdir /mnt/zumbi.home
  mount zumbi:/omnisys/machs/temp.zumbi/home/edrx /mnt/zumbi.home

exit

# (find-fline "/mnt/omnisys.software/")
# (find-fline "/mnt/omnisys.backup/")
# (find-fline "/mnt/zumbi.home/")




#####
#
# readconfig
# 2008jan04
#
#####

# «readconfig»  (to ".readconfig")
# (find-luamanualw3m "#luaL_newstate")
# (find-luamanualw3m "#luaL_openlibs")
# (find-lua51file "src/")
# (find-lua51file "src/lua.c" "L = lua_open();")
# (find-lua51tag "lua_open")
# (find-lua51tag "lua_open" "#define lua_open()")
# (find-lua51tag "lua_open" "#define lua_open()" "luaL_newstate()")
# (find-es "lua5" "lua-api-from-gdb")
# (find-es "lua5" "pil24.1")

# (find-lua51tag "lua_open")

# (find-luamanualw3m "#luaL_newstate")
# (find-luamanualw3m "#luaL_openlibs")

#*
rm -Rv /tmp/readconfig/
mkdir  /tmp/readconfig/
cd     /tmp/readconfig/

cat > readconfig.c <<'%%%'
#include <stdio.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <string.h>   // for strlen

void GetConfig_int(lua_State *L, int *ptr, const char *luaname, int dflt) {
  lua_getglobal(L, "GetConfig_int");
  lua_pushstring(L, luaname);
  lua_pushnumber(L, dflt);
  lua_call(L, 2, 1);
  *ptr = lua_tonumber(L, 1);          // I'm not sure here... 1? 0?
  lua_pop(L, 1);
}
  
int main (void) {
  int widget_size;
  int widget_color;
  lua_State *L = luaL_newstate();     // opens Lua
  luaL_openlibs(L);                   // opens the standard libraries
  luaL_dofile(L, "readconfig.lua");   // (find-luamanualw3m "#luaL_dofile")
  GetConfig_int(L, &widget_size,  "widget_size",  4);
  GetConfig_int(L, &widget_color, "widget_color", 9);
  printf("widget size: %d\n", widget_size);
  lua_close(L);
  return 0;
}
%%%

cat > configs.lua <<'%%%'
widget_size = 200
%%%

cat > readconfig.lua <<'%%%'
dofile "configs.lua"
printf = function (...) io.write(string.format(...)) end
GetConfig_int = function (name, default)
    printf("GetConfig_int: name=%q, default=%s\n", name, tostring(default))
    if _G[name] then
      printf("A global variable named %s was found, "..
             "returning its value (=%d)\n", name, _G[name])
      return tonumber(_G[name])
    else
      printf("Using the default value for %s (=%d)\n", name, default)
      return default
    end
  end
%%%

lua51 readconfig.lua

gcc -g -o readconfig readconfig.c -ldl -lm \
    -I$HOME/usrc/lua-5.1.2/src \
      $HOME/usrc/lua-5.1.2/src/liblua.a

./readconfig

#*
# (find-lua51file "src/")
# (find-lua51file "src/Makefile")
# (find-luamanualw3m "#luaL_dofile")
# (find-luamanualw3m "#lua_pushnumber")

(defun eepitch-gdb-readconfig ()
  (eepitch-gdb "*gud-readconfig*" "gdb --annotate=3 /tmp/readconfig/readconfig"))
(defun eepitch-gdb-readconfig-kill ()
  (eepitch-gdb-kill "*gud-readconfig*"))

* (eepitch-gdb-readconfig)
* (eepitch-gdb-readconfig-kill)
* (eepitch-gdb-readconfig)
br main
run
br GetConfig_int
run


# (find-lua51file "oml" "liblua.a")
# (find-lua51file "oml" "gcc -o lua ")
# gcc -o lua  lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
# gcc -o pil24_1 pil24_1.o $LUA51SRC/src/liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
  gcc -Wall -o pil24_1 pil24_1.o $LUA51SRC/src/liblua.a -lm -Wl,-E -ldl




#####
#
# adding a file to the wiki at zumbi
# 2008jan04
#
#####

# «zumbi-wiki-cvs»  (to ".zumbi-wiki-cvs")
# (find-zumbiwikifile "note.engsoft.PDSw")
# (find-fline "~/LOGS/2008jan04.omnisys" "nome: note.engsoft.PDSw ?")
# (find-fline "~/usrc/zumbi-wiki/")
# (find-fline "~/usrc/zumbi-wiki/www/")
# (find-fline "~/usrc/zumbi-wiki/www/wiki/")
# (find-fline "~/usrc/zumbi-wiki/www/wiki/note.engsoft.PDSw")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

rm -Rv ~/usrc/zumbi-wiki/
mkdir  ~/usrc/zumbi-wiki/
cd     ~/usrc/zumbi-wiki/
export 'CVSROOT=:ext:edrx@_zumbi:/omnisys/cvsroot'
# cvs checkout www
cvs checkout www/wiki

cd     ~/usrc/zumbi-wiki/www/wiki/
cvs add note.engsoft.PDSw
cvs up
cvs commit -m "fixed the \"^O\" chars"
cvs commit -m "added notes about PDSw"
cvs commit -m "added notes about PDSw" HEADER.html

# http://zumbi/cgi-bin/cvsweb.cgi/www/wiki/
# http://zumbi/cgi-bin/cvsweb.cgi/www/wiki/project.cla-tlm.Configuration
# http://zumbi/cgi-bin/cvsweb.cgi/www/wiki/note.engsoft.PDSw




#####
#
# blogmeizing the wiki with -w2html
# 2008jan08
#
#####

# «zumbi-wiki-w2html»  (to ".zumbi-wiki-w2html")
# (find-es "blogme" "blogme3-at-zumbi")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

# (find-fline "~/blogme3/")
# (find-blogme3 "Makefile")
# (find-blogme3 "Makefile" "cd ~/blogme3/; make S=$S testb")
#
cd ~/blogme3/ && make S=$S cleanscripts
cd ~/blogme3/ && make S=$S linkbinaries scripts

cd ~/usrc/zumbi-wiki/www/wiki/
'ls' | grep -v 'html$'
ls note* project* | grep -v 'html$' | tee .files
for i in $(cat .files); do ~/blogme3/w2html $i; done

# (find-fline "~/usrc/zumbi-wiki/www/wiki/")
# (find-zumbiwikicvsfile "project.cla-tlm.GuiIoMessages")
# (find-zumbiwikicvsw3m  "project.cla-tlm.GuiIoMessages.html")




#####
#
# copying all the telemedidas docs
# 2008jan21
#
#####

# «telemedidas-docs»  (to ".telemedidas-docs")

* (eepitch-caramelo)
* (eepitch-kill)
* (eepitch-caramelo)
# (find-noronhafile "")
# (find-noronhafile "Telemedidas Redundante/")
cd "/mnt/omnisys.files/Telemedidas Redundante/"
tar -cvf ~/tm.tar PD PDP PP Software
ls -lAF  ~/tm.tar

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/tm/
mkdir  /tmp/tm/
cd     /tmp/tm/
scp -v edrx@caramelo:tm.tar .
tar -xvf tm.tar




#####
#
# Professional Software Development
# 2008jan23
#
#####

# «profsoftdevel»  (to ".profsoftdevel")
# https://ghetto.homeunix.net/doc/devel/software_eng/
#*
rm -Rv /tmp/profsoftdevel/
mkdir  /tmp/profsoftdevel/
cd     /tmp/profsoftdevel/
extract_chmLib ~/books/professional_software_devel.chm /tmp/profsoftdevel/
rm -Rv \#* \$*

#*
# (code-c-d "profsoftdevel" "/tmp/profsoftdevel/" :ffox)
# (find-profsoftdevelfile "")
# (find-profsoftdevelw3m "0321193679_toc.html")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd        /tmp/profsoftdevel/
tar -cvzf /tmp/profsoftdevel.tgz *

* (ee-cp "/tmp/profsoftdevel.tgz" (ee-zumbifile "o.tgz") 'over)
* (eepitch-zumbi)
* (eepitch-kill)
* (eepitch-zumbi)
mkdir  ~/public_html/
cd     ~/public_html/
rm -Rv ~/public_html/professional_software_engineering/
mkdir  ~/public_html/professional_software_engineering/
cd     ~/public_html/professional_software_engineering/
tar -xvzf ~/o.tgz

cd ~/public_html/professional_software_engineering/
~/blogme3/lstoindexhtml-here
for i in $(find . -type d); do echo $i; done
for i in $(find . -type d); do (echo $i; cd $i; ~/blogme3/lstoindexhtml-here); done

# http://zumbi/~edrx/
# http://zumbi/~edrx/professional_software_engineering/





#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: