2011-07-24

ActiveTcl 8.5.10.1 released

ActiveTcl 8.5.10.1 已經在 2011/07/21 釋出,我把目前的使用環境更新為這個版本。

可以看一下 comp.lang.tcl 的消息

== New in ActiveTcl 8.5.10.1 ==

A patchlevel release with updates, including:
  • Updated Tcl/Tk 8.5.10 core
  • Updated teacup package management application
  • Updated packages
    • Sqlite 3.7.7.1
    • Tablelist 5.3.1

2011-07-20

使用 7-zip 壓縮目錄與檔案

#!/usr/bin/tclsh
#
# This file is used to backup my homepage
#

set backupfile $env(HOME)
append backupfile "/Homepage-"
append backupfile [clock format [clock seconds] -format %Y%m%d]
append backupfile ".7z"

set backupdir $env(HOME)
append backupdir "/public_html"

set fileExist [file exists $backupfile]
if {$fileExist > 0} {
    puts "Now try to remove old backup file."
    file delete $backupfile
}

set var [list 7z a $backupfile $backupdir]
exec {*}$var

puts "Done."

使用 7-zip 建立網頁的備份檔案 (on Linux)。