From 8fb78f857f03cbd75c56bf11c367c861dcc00e0b Mon Sep 17 00:00:00 2001 From: ian Date: Thu, 19 Jul 2001 20:11:44 +0000 Subject: [PATCH] bugfixes --- autotitle/.cvsignore | 1 + files/_.configs_chiarks | 4 ++-- files/_.configs_setenvir | 2 +- files/_.configs_startemacs | 2 +- files/_.configs_xclients | 9 -------- perms | 24 +++++++++++++++---- process | 47 ++++++++++++++++++++++++++++++-------- 7 files changed, 62 insertions(+), 27 deletions(-) create mode 100644 autotitle/.cvsignore diff --git a/autotitle/.cvsignore b/autotitle/.cvsignore new file mode 100644 index 0000000..5d5f986 --- /dev/null +++ b/autotitle/.cvsignore @@ -0,0 +1 @@ +autotitle diff --git a/files/_.configs_chiarks b/files/_.configs_chiarks index 7bb331a..23ef68f 100755 --- a/files/_.configs_chiarks +++ b/files/_.configs_chiarks @@ -15,11 +15,11 @@ for x in 3 2 1 do sz=80x55 y=$[35*$x+100+$pixels_y] - xb=$[(($pixels_x-503)*(3-$x))/2] + xb=$(( (($pixels_x-503)*(3-$x))/2 )) xterm-CT "chiark ssh #$x" -geometry $sz+$xb+$y \ -e ssh chiark.greenend.org.uk -l ijackson & echo -n : - xterm-CT "chiark ssh ian #$x" -geometry $sz+$[$pixels_x+$xb]+$y \ + xterm-CT "chiark ssh ian #$x" -geometry $sz+$(( $pixels_x+$xb ))+$y \ -e ssh chiark.greenend.org.uk -l ian & echo -n : done diff --git a/files/_.configs_setenvir b/files/_.configs_setenvir index d85148c..a5ce354 100755 --- a/files/_.configs_setenvir +++ b/files/_.configs_setenvir @@ -1,7 +1,7 @@ #!/bin/sh # Set up the environment: -PATH=$HOME/personal/@@$platform@@/bin +PATH=$HOME/personal/@@$platform@@/bin:$HOME/personal/scripts/bin @@?$ncipher?@@@@# PATH=$PATH:$HOME/personal/linux-i386/crypto/scripts @@;@@# diff --git a/files/_.configs_startemacs b/files/_.configs_startemacs index 76eb6cb..3f5a80e 100755 --- a/files/_.configs_startemacs +++ b/files/_.configs_startemacs @@ -5,7 +5,7 @@ echo -n '#' cd eval `cd $HOME && .configs/configure` -emacs -f make-session -geometry 80x60+$[$pixels_x*3-486]+0 & +emacs -f make-session -geometry 80x60+$(( $pixels_x*3-486 ))+0 & # if [ "x$chost" = x ] # then diff --git a/files/_.configs_xclients b/files/_.configs_xclients index 7409bc0..6a611d9 100755 --- a/files/_.configs_xclients +++ b/files/_.configs_xclients @@ -18,15 +18,6 @@ xterm -n 'xterm d' -T xterm -geometry 80x25+0-10 & .configs/chiarks -( - cat .Xauthority .Xauthority | rsh scarp cat \>.Xauthority - remoteshell -rrsh scarp -geometry 80x25+0+258 - echo -n '~' - remoteshell -rrsh -s/opt/bin/bash scarp \ - emacs -geometry 90x60+$[$pixels_x*4-546]+$pixels_y - echo -n '~' -) & - remoteshell -rrsh keynes -geometry 80x25+172+159 & echo -n : diff --git a/perms b/perms index 69efd01..d6e4f13 100644 --- a/perms +++ b/perms @@ -1,9 +1,23 @@ -.bash_history 0400 +.bash_history 0400 -.configs/xprofile 0775 +.configs/checkconfig +x +.configs/chiarks +x +.configs/configure +x +.configs/startemacs +x +.configs/x11start +x +.configs/xbiffs +x +.configs/xclients +x +.configs/xprofile +x +.configs/xtools +x +personal/scripts/bin/remoteshell +x +personal/scripts/bin/xloadt +x -personal/@@$platform@@/bin/ 2775 +personal/@@$platform@@/bin/ / +junk/ / -.configs/cache/ 2770 -private/ 2770 +.configs/cache/ 2770 +.counters/ 2770 +private/ 2770 + +bitmap/root -> bitmap/fischer . diff --git a/process b/process index bf3295d..5130918 100755 --- a/process +++ b/process @@ -41,10 +41,22 @@ for (;;) { chomp; s/^\s+//; s/\s+$//; next if m/^\#/; next unless m/\S/; last if m/^\.$/; - m/^(.*\S)\s+([0-7]+)$/ or die; - ($of,$pe)=($1,oct $2); - $isdir= $of =~ s,/$,,; - ($isdir ? $dirperms{$of} : $fileperms{$of}) = $pe; + if (m/(.*\S)\s+\-\>\s+(\S.*)/) { + $linktargs{$1}= $2; + } elsif (m/^(.*\S)\s+(\S+)$/) { + ($of,$pe)=($1,$2); + $isdir= $of =~ s,/$,,; + if ($pe =~ m/^[0-7]+$/) { + $pe= oct $&; + } elsif ($pe eq '+x') { + $pe= 0777&~$umask; + } elsif ($pe eq '/') { + $pe= 02777&~$umask; + } else { + die "$pe ?"; + } + ($isdir ? $dirperms{$of} : $fileperms{$of}) = $pe; + } } fin_prep(); @@ -121,12 +133,11 @@ while ($if=readdir D) { if ($nowperms != $perms) { would($of, sprintf 'chmod %04o -> %04o', $nowperms, $perms); } - if (!$action) { - system 'diff','-u',$home.$of,$newf; - $?==0 or $?==256 or die $?; - $changes++ if $?; - } + system 'diff','-u',$home.$of,$newf; + $?==0 or $?==256 or die $?; + $changes++ if $?; } else { + die unless $!==&ENOENT; would($of, sprintf 'create %04o', $perms); } if ($action) { @@ -139,6 +150,24 @@ closedir D or die $!; die join(', ', keys %fileperms) if %fileperms; +foreach $link (keys %linktargs) { + mkparents($link); + $targ= $linktargs{$link}; + if (lstat $home.$link) { + -l _ or die "$link is not a link!"; + defined($rl= readlink $home.$link) or die $!; + } else { + die unless $!==&ENOENT; + $rl= ''; + } + if ($rl ne $targ) { + would($link, "symlink $targ <-"); + if ($action) { + symlink $targ,$home.$link or die $!; + } + } +} + foreach $dir (keys %dirperms) { ensuredir($dir); } -- 2.30.2