dsc diff [prefix] -- show the difference between saved and stash
dsc revert opt -- revert opt's configuration
dsc commit -- commit (save) configuration
- dsc export >file.txtar -- export whole configuration
- dsc import <file.txtar -- import it
+ dsc export [prefix] >file.txtar -- export (whole by default) configuration
+ dsc import <file.txtar -- import it
Environmental variables:
$DSC_SCHEMA -- path to the schema definition
proc walk {root typ} {
set rv [list]
+ set root [string trimright $root /]
set dirs [glob -directory $root -types $typ -tails -nocomplain -- *]
foreach s [lsort $dirs] {
lappend rv $root/$s
file delete -force $Saved.bak
}
export {
- set dirs [walk $Saved d]
+ set dirs [walk $Saved/$opt d]
+ if {$opt != ""} {
+ set dirs [list $Saved/$opt {*}$dirs]
+ }
puts "-- .dirs --"
foreach fn $dirs {
puts [string range $fn [string length $Saved]+1 end]