Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on Debian 5.0 (Lenny).
#
# 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.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# 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/lenny.e>
#           or at <http://angg.twu.net/e/lenny.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/>.
#
#######






# «.dvd»			(to "dvd")
# «.var-cache-apt-archives»	(to "var-cache-apt-archives")
# «.apt-ftparchive»		(to "apt-ftparchive")
# «.home-lenny-DVD»		(to "home-lenny-DVD")
# «.aptis»			(to "aptis")
# «.syncing-the-edrx.tgzs»	(to "syncing-the-edrx.tgzs")
# «.syncing-books»		(to "syncing-books")
# «.setting-up-lua»		(to "setting-up-lua")
# «.setting-up-dednat4»		(to "setting-up-dednat4")
# «.snarf»			(to "snarf")
# «.minisnarf»			(to "minisnarf")






#####
#
# dvd
# 2009apr27
#
#####

# «dvd»  (to ".dvd")
# http://cdimage.debian.org/debian-cd/5.0.0/i386/bt-dvd/
# (find-fline "/hda6/dvds/")
# (find-fline "/etc/fstab")
# (find-fline "/dvds/")
# (find-fline "/dvds/lenny/")
# (find-fline "/dvds/lenny/install.386/")
# (find-w3m "/dvds/lenny/doc/manual/en/ch04s03.html")

# (find-pen-links)
# (find-man "8 mount" "Mount options for fat" "uid=value")
# (find-sh "dmesg")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/pen/
sudo mount -o ro       -t vfat /dev/sdb1 /tmp/pen/
# (find-fline "/tmp/pen/")
sudo umount /tmp/pen

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo mount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/
# (find-fline "/tmp/pen/")
# (find-w3m   "/dvds/lenny/doc/manual/en/ch04s03.html")
# (find-fline "/dvds/lenny/install.386/")
# (find-fline "/dvds/")
# (find-fline "/hda6/dvds/")
sudo syslinux /dev/sdb1
cd /dvds/lenny/install.386/
cp -v initrd.gz /tmp/pen/
cp -v vmlinuz   /tmp/pen/
cd /dvds/
sudo cp -v debian-500-i386-DVD-1.iso /tmp/pen/
sudo cp -v debian-500-i386-DVD-1.iso /tmp/pen2/

sudo umount /tmp/pen

# /dvds(edrx:pe)# cp -v debian-500-i386-DVD-1.iso /tmp/pen/
# `debian-500-i386-DVD-1.iso' -> `/tmp/pen/debian-500-i386-DVD-1.iso'
# zsh: file size limit exceeded  cp -v debian-500-i386-DVD-1.iso /tmp/pen/



# syslinux /dev/sdX1

Again, take care that you use the correct device name. The partition
must not be mounted when starting syslinux. This procedure writes a
boot sector to the partition and creates the file ldlinux.sys which
contains the boot loader code.

4.3.2.2. Adding the installer image

Mount the partition (mount /dev/sdX1 /mnt) and copy the following
installer image files to the stick:

  * vmlinuz (kernel binary)
   
  * initrd.gz (initial ramdisk image)
   
You can choose between either the regular version or the graphical
version of the installer. The latter can be found in the gtk
subdirectory. If you want to rename the files, please note that
syslinux can only process DOS (8.3) file names.

Next you should create a syslinux.cfg configuration file, which at a
bare minimum should contain the following two lines:

default vmlinuz
append initrd=initrd.gz



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo \

R
wodim -v -d /dev/sr0 speed=8 \
  /hda6/dvds/debian-500-i386-DVD-1.iso

  /dvds/debian-500-i386-DVD-1.iso

# (find-fline "/dvds/")
# (find-fline "/hda6/dvds/")

# (find-sh "dmesg")
# (find-sh "sudo wodim --devices")
# (find-sh "sudo wodim -scanbus")
# (find-sh "sudo wodim dev=help")
# (find-es "cdrom" "wodim")
# (find-man "1 wodim")
# (find-status   "wodim")
# (find-vldifile "wodim.list")
# (find-udfile   "wodim/")

# (find-fline "/etc/fstab")

# (find-status   "dvdrtools")
# (find-vldifile "dvdrtools.list")
# (find-udfile   "dvdrtools/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
groups
sudo su - edrx
groups
wodim -v -d dev=/dev/sr0 speed=8 \
  /hda6/dvds/debian-500-i386-DVD-1.iso

* (eexterm-kill "A")
* (eexterm "A")
groups
sudo su - edrx
groups
wodim -v dev=/dev/sr0 /hda6/dvds/debian-500-i386-DVD-1.iso
mkdir /tmp/dvd/
mount /tmp/dvd/
dmesg | tail

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

wodim -v dev=/dev/hdd speed=8 \
  $S/http/ubuntu.c3sl.ufpr.br/releases/kubuntu/gutsy/kubuntu-7.10-desktop-i386.iso

* (eexterm-kill "A")
* (eexterm "A")
groups
sudo su - edrx
groups
mkdir /tmp/dvd/
mount /tmp/dvd/

sudo mount -o ro -t iso9660 /dev/sr0 /tmp/dvd/


/tmp/schily/bin/cdrecord -v dev=/dev/sr0 /hda6/dvds/debian-500-i386-DVD-1.iso
sudo /tmp/schily/bin/cdrecord -v dev=/dev/sr0 /hda6/dvds/debian-500-i386-DVD-1.iso
/tmp/schily/bin/cdrecord -v dev=1,0,0 /hda6/dvds/debian-500-i386-DVD-1.iso
/tmp/schily/bin/cdrecord -v /hda6/dvds/debian-500-i386-DVD-1.iso
sudo /tmp/schily/bin/cdrecord -scanbus
sudo /tmp/schily/bin/cdrecord --devices
dmesg | tail


# (find-fline "/dvds/lenny/")
# (find-fline "/dvds/lenny/md5sum.txt")
cd /dvds/lenny/
laf
md5sum --help
md5sum -c md5sum.txt




#####
#
# /var/cache/apt/archives/
# 2009apr27
#
#####

# «var-cache-apt-archives»  (to ".var-cache-apt-archives")
# (find-es "debrepository" "var-www-vcarchives-0")
# (find-fline "/var/cache/apt/archives/")
# (find-angg ".emacs" "vcaa")
# (find-esgrep "grep -nH -e ftparchive *.e")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-pen-links)

# Pack vcaa.tar: the old way,
cd /var/cache/apt/archives/
du -c
tar -cvf /tmp/vcaa.tar *

# And the better way:
# (find-angg ".emacs" "vcaa")
cd /var/cache/apt/archives/backup/
du -c *.deb
tar -cvf /tmp/vcaa.tar *.deb

laf      /tmp/vcaa.tar
cp -v    /tmp/vcaa.tar /tmp/pen/

cp -v    /tmp/pen/vcaa.tar /tmp/

# Unpack vcaa.tar:
cd /var/cache/apt/archives/
du -c
laf      /tmp/vcaa.tar
tar -tvf /tmp/vcaa.tar *
sudo tar -xvf /tmp/vcaa.tar

# (find-file "~/tmp/")
# (find-file "~/tmp/debs/")


# «apt-ftparchive»  (to ".apt-ftparchive")
# (find-es "lenny" "apt-ftparchive")
# (find-man "1 apt-ftparchive")
# (find-zsh "dmissing apt-ftparchive")
# (find-sh0 "sudo chown -v edrx:edrx /etc/apt/sources.list")
# (find-fline                       "/etc/apt/sources.list")
# (find-fline "/var/cache/apt/archives/")
# (find-fline "~/tmp/" " debs")
# (find-fline "~/tmp/dists/")
# (find-fline "~/tmp/dists/lenny/main/binary-i386/")
# deb file:///home/edrx/tmp lenny main
#
# deb     http://ftp.de.debian.org/debian lenny main contrib non-free
# deb-src http://ftp.de.debian.org/debian lenny main contrib non-free

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

cd ~/tmp/
rm -Rv   ~/tmp/dists/lenny/main/binary-i386/
mkdir -p ~/tmp/dists/lenny/main/binary-i386/
#
rm -v ~/tmp/debs
# ln -s /var/cache/apt/archives        ~/tmp/debs
  ln -s /var/cache/apt/archives/backup ~/tmp/debs
#
cd ~/tmp/
apt-ftparchive packages debs \
  | tee        dists/lenny/main/binary-i386/Packages \
  | gzip -c9 > dists/lenny/main/binary-i386/Packages.gz

sudo apt-get update
sudo dselect update




#####
#
# Copying the lenny DVD
# 2009may21
#
#####

# «home-lenny-DVD»  (to ".home-lenny-DVD")
# (find-sh0 "sudo chown -v edrx:edrx /etc/apt/sources.list")
# (find-fline                       "/etc/apt/sources.list")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
du -c  /home/lenny/
rm -Rv /home/lenny/
sudo mount /media/cdrom0/
cd         /media/
cp -av            cdrom0 /home/lenny

# (find-sh0 "sudo chmod 755 /home/lenny/")
# (find-fline              "/home/lenny/")
#
# deb file:/dvds/lenny/debian lenny main contrib
# deb     http://ftp.de.debian.org/debian lenny main contrib non-free
# deb-src http://ftp.de.debian.org/debian lenny main contrib non-free





#####
#
# aptis
# 2009apr27
#
#####

# «aptis»  (to ".aptis")
# (find-angg ".zshrc" "prep-apti")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
apti -y --force-yes fvwm zsh
apti -y --force-yes build-essential cvs
sudo apt-get -y --force-yes build-dep emacs22
apti -y --force-yes libreadline-dev
apti -y --force-yes grep-dctrl debtags tagcoll
apti -y --force-yes texlive-math-extra
apti -y --force-yes texlive-pictures
apti -y --force-yes gv xpdf djview xzgv
apti -y --force-yes w3m-el
apti -y --force-yes texlive-doc-en
apti -y --force-yes unclutter

apti -y --force-yes a2ps
apti -y --force-yes cups-pdf
apti -y --force-yes vlc totem mplayer

apti -y --force-yes a2ps nicotine fakeroot cdbs
apti -y --force-yes flashplugin-nonfree
apti -y --force-yes mpg321
apti -y --force-yes mplayer totem vlc
apti -y --force-yes unicode-data
apti -y --force-yes rsync
apti -y --force-yes openssh-server
apti -y --force-yes lua5.1 lua5.1-doc liblua5.1-dev

apti -y --force-yes gdb gdb-doc

apti -y --force-yes manpages-dev glibc-doc glibc-doc-reference
apti -y --force-yes dict dictd dict-server
apti -y --force-yes dict-gcide dict-wn dict-jargon dict-foldoc dict-vera
apti -y --force-yes tk-doc tk-dev
apti -y --force-yes tcl8.5 tk8.5
apti -y --force-yes tcl8.4 tk8.4
apti -y --force-yes expect expectk

apti -y --force-yes libchm-bin

# (find-man "apt-get")





#####
#
# syncing the edrx.tgzs (this should be elsewhere)
# 2009may18
#
#####

# «syncing-the-edrx.tgzs»  (to ".syncing-the-edrx.tgzs")
# (find-pen-links)
# (find-fline "/tmp/pen/")

* (eepitch-shell)
# For ubuntu:
sudo umount /dev/sdb1

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-pen-links)
mkdir /tmp/pen/
sudo mount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/
# (find-fline "/tmp/pen/")

# Unpack the other edrx.tgz in /tmp/edrx/
#   and list the files that are different:
rm -Rv /tmp/edrx/
mkdir  /tmp/edrx/
cd     /tmp/edrx/
tar -xvzf /tmp/pen/edrx.tgz

# Or: (eev "cd /tmp/ && rm -fv edrx.tgz && wget http://angg.twu.net/edrx.tgz")
# (find-sh "tar -C /tmp/edrx/ -xvzf /tmp/edrx.tgz")

find . -type f | cut -b3- | sort
for i in $(find . -type f | cut -b3- | sort); do
  cmp -s $i ~/$i || echo $i
done  | tee /tmp/o

for i in $(cat /tmp/o); do
  echo "# (find-tkdiff    \"/tmp/edrx/$i\" \"~/$i\")"
  echo "# (find-sh0 \"cp -v /tmp/edrx/$i   ~/$i\")"
done


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-pen-links)
mkdir /tmp/pen/
sudo mount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/
# (find-fline "/tmp/pen/")
# (find-sh "cd ~/books/ && find * -type f | sort")
# (find-tkdiff "~/ORG/index.org" "/tmp/pen/index.org")

makeLedrxtgz
cp -v ~/TH/L/edrx.tgz /tmp/pen/
cp -v ~/NOTES         /tmp/pen/notes-$machine
cp -v ~/TODO          /tmp/pen/todo-$machine
cp -v ~/.psne.log     /tmp/pen/psne-log-$machine
cp -v ~/ORG/index.org /tmp/pen/index.org-$machine
cd ~/books/ && find * -type f | sort > /tmp/pen/books-$machine
installeddebs | awk -F _ '{print $1}' | sort > /tmp/pen/installeddebs-$machine

cp -v ~/PURO/Relatorio.doc /tmp/pen/Relatorio-$machine.doc

# (find-sh "cd $S/http/www.movimentoautentico.com/ && tar -cvzf /tmp/maut.tgz .* *")
cp -v /tmp/maut.tgz   /tmp/pen/maut.tgz
cp -v /tmp/vcaa.tar   /tmp/pen/

sudo umount /tmp/pen



# (find-angg ".emacs" "vcaa")
# (find-vcaafile "")
# (find-vcaabfile "")
# (find-vcaash0 "sudo cp -vul *.deb backup/")




#####
#
# Syncing the "books" directory
# 2010apr30
#
#####

# «syncing-books»  (to ".syncing-books")
# (find-fline "/tmp/pen/books-gwen")
# (find-fline "/tmp/pen/books-persephone")
# (find-node "(coreutils)comm invocation")
# (find-sh "comm    /tmp/pen/books-persephone /tmp/pen/books-gwen")
# (find-sh "comm -3 /tmp/pen/books-persephone /tmp/pen/books-gwen")
# (find-sh "comm -3 /tmp/pen/books-gwen       /tmp/pen/books-horses")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Paste into the A=():
A=(
__gaiman/gaiman__sandman_vol_10_the_wake.tgz
__gaiman/gaiman__sandman_vol_1_preludes_and_nocturnes.tgz
__gaiman/gaiman__sandman_vol_2_the_doll_s_house.tgz
__gaiman/gaiman__sandman_vol_4_season_of_mists.tgz
__gaiman/gaiman__sandman_vol_5_a_game_of_you.tgz
__gaiman/gaiman__sandman_vol_7_brief_lives.tgz
__gaiman/gaiman__sandman_vol_8_worlds_end.tgz
__gaiman/gaiman__sandman_vol_9_the_kindly_ones.tgz
__piaget/muller_carpendale_smith__the_cambridge_companion_to_piaget.pdf
__piaget/papert__mindstorms.pdf
__piaget/perret-clemont_barrelet__jean_piaget_and_neuchatel__the_learner_and_the_scholar.pdf
__piaget/piaget__judgement_and_reasoning_in_the_child.pdf
__piaget/piaget__the_child_s_conception_of_number.pdf
__piaget/piaget__the_child_s_conception_of_space.pdf
__piaget/piaget__the_language_and_thought_of_the_child.pdf
__piaget/piaget__the_psychology_of_inteligence.pdf
__piaget/scholnick__conceptual_development__piaget_s_legacy.pdf
__piaget/serulnikov_suarez__piaget_para_principiantes.pdf
__piaget/singer_revenson__a_piaget_primer_how_a_child_thinks.pdf
__piaget/smith_dockrell_thomlinson__piaget_vygotsky_and_beyond.pdf
)
cd ~/books/
tar -cvf /tmp/books.tar $A
md5sum $A | tee /tmp/books.md5
laf /tmp/books.tar
cp -v /tmp/books.tar /tmp/pen/
cp -v /tmp/books.md5 /tmp/pen/

# Test:
cp -v /tmp/pen/books.tar /tmp/
cp -v /tmp/pen/books.md5 /tmp/
mkdir  /tmp/books/
tar -C /tmp/books/ -xvf /tmp/books.tar
cd /tmp/books/
md5sum -c /tmp/books.md5

# then unmount (when copying to /tmp/pen/), or...
sudo umount /tmp/pen

# unpack.
tar -C ~/books/ -xvf /tmp/books.tar





#####
#
# setting up lua
# 2009may21
#
#####

# «setting-up-lua»  (to ".setting-up-lua")
# (find-es "lua5" "install-5.1.4")
# (find-es "lua5" "lpeg-0.9")




#####
#
# setting up dednat4
# 2009may21
#
#####

# «setting-up-dednat4»  (to ".setting-up-dednat4")
# (find-dn4exsh "ls")
# (find-dn4exfile "")
# (find-dn4exfile "Makefile")
# (find-dn4 "Makefile" "demo1")
# (find-dn4 "Makefile" "dednat4")
# (find-angg ".emacs" "eedn4a")
# (find-dn4ex "eedemo1.tex")

# (find-sh "cd ~/LATEX/ && pwd && ~/dednat4/.files.sh -n cptexinputs")
# (find-sh "cd ~/LATEX/ && pwd && ~/dednat4/.files.sh    cptexinputs")
# (find-sh "cd ~/LATEX/ && pwd && ~/dednat4/.files.sh -n rmtexinputs")
# (find-sh "cd ~/LATEX/ && pwd && ~/dednat4/.files.sh    rmtexinputs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/dednat4/
make clean
make S=$S dednat41
make S=$S demo1
cd ~/LATEX/ && pwd && ~/dednat4/.files.sh -n rmtexinputs
cd ~/LATEX/ && pwd && ~/dednat4/.files.sh    rmtexinputs
cd ~/LATEX/ && pwd && ~/dednat4/.files.sh -n cptexinputs
cd ~/LATEX/ && pwd && ~/dednat4/.files.sh    cptexinputs


%*
% (eedn4a-bounded)
% (find-sh0 "cd ~/LATEX/ && dvips  -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-sh0 "cd ~/LATEX/ && dvired -D 300 -P pk -o tmp.ps tmp.dvi")
% (find-pspage "~/LATEX/tmp.ps")

%D diagram miniadj
%D 2Dx      100   120
%D 2D  100 a^L <= a
%D 2D       -     -
%D 2D       |     |
%D 2D       v     v
%D 2D  120  b => b^R
%D a^L a <=   a^L b |->   a b^R |->   b b^R =>
%D enddiagram
$$\diag{miniadj}$$

%:           [a,b]^1
%:           -------
%:  [a,b]^1     b      b|->c
%:  -------     ------------
%:     a             c
%:     ---------------
%:          a,c
%:        ---------1
%:        a,b|->a,c
%:
%:        ^tree1
%:
$$\ded{tree1}$$

%*





#####
#
# snarf
# 2009may21
#
#####

# «snarf»  (to ".snarf")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Pack:
cd $S/
du -c
laf       /tmp/pen/snarf.tgz
tar -cvzf /tmp/pen/snarf.tgz *

# Unpack:
tar -C $S/ -xvzf /tmp/pen/snarf.tgz





#####
#
# minisnarf
# 2009may21
#
#####

# «minisnarf»  (to ".minisnarf")
# (find-es "lua5" "install-5.1.3")
# (find-es "lua5" "lpeg-0.9")
# (find-dn4 "Makefile" "texdownloads")
# (find-angg ".zshrc" "prep-Contents")
# (find-es "flash" "flash-on-lenny")

# Pack (incomplete):

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
A=(
http://www.lua.org/ftp/lua-5.1.3.tar.gz
http://www.lua.org/ftp/lua-5.1.4.tar.gz
http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-0.9.tar.gz

http://www.math.ucla.edu/~asl/bussproofs.sty
http://www.monad.me.uk/proofs/prooftree.sty
http://www.ctan.org/tex-archive/macros/latex/contrib/lkproof/proof.sty
ftp://ftp.math.mcgill.ca/pub/barr/diagxy.zip
http://www.ctan.org/tex-archive/macros/generic/diagrams/barr/diagxy.tex

http://ftp.debian.org/dists/lenny/Contents-i386.gz

http://ftp.de.debian.org/debian/pool/contrib/f/flashplugin-nonfree/flashplugin-nonfree_2.6.dsc
http://ftp.de.debian.org/debian/pool/contrib/f/flashplugin-nonfree/flashplugin-nonfree_2.6.tar.gz
)

# Besides that:
# emacs-cvs.tgz
# w3m-cvs.tgz



# (find-fline "/etc/hosts")



#  Local Variables:
#  coding:               utf-8-unix
#  End: