delorie.com/archives/browse.cgi | search |
Joshua: > Create an external perl, python, eh... fortran ... script which symlinks > all the symbols into the same directory with a new symbol name of > "<date>.<username>.<orignalName>.sym" This puts each contributor's in > their own user space, allows usage of new symbols without breaking old > schematics and doesn't require any code change in gschem. You can then > filter by date or contributor in gschem. You mean someting like: $ cat find_sym.sh #!/bin/sh time2iso() { s=$1; shift date -d "1970-01-01 UTC $s seconds" "$@" } fileModTime() { stat -c%Y "$@" } work() { i=$1 author=$2 a=$3 dir=`dirname $a` file=`basename $a` ver=`grep $file $dir/CVS/Entries | ( IFS=/ read a b c d; echo $c )` s=`fileModTime $i` Date=`time2iso $s +%Y_%m_%d` # remove the echo if you trust this echo ln -s $a $tgt/${author}_v${ver}_${Date}_$file } Find() { root=$1 tgt=$2 for i in $root/* do author=`basename $i` find $i -type f -name \*.sym | while read a do work $i $author $a done done } Find "$@" $ find_sym.sh /Net/cvs/cvs.gedasymbols.org/www/user symbols | head -1 ln -s /Net/cvs/cvs.gedasymbols.org/www/user/ales_hvezda/symbols/lm2852y-1.sym symbols/ales_hvezda_v1.1_2013_11_30_lm2852y-1.sym $ Would people be satisfied with that ? Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |