* lib/mc.menu: Remove all references to $MC_CONTROL_FILE, which

was unsafe by design and is no longer supported.  Use %t instead
of %u to preserve tags in case of failure.
This commit is contained in:
Pavel Roskin 2002-08-18 22:53:07 +00:00
parent 5d6b103e96
commit ab104ea1f5
2 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,9 @@
2002-08-18 Pavel Roskin <proski@gnu.org> 2002-08-18 Pavel Roskin <proski@gnu.org>
* lib/mc.menu: Remove all references to $MC_CONTROL_FILE, which
was unsafe by design and is no longer supported. Use %t instead
of %u to preserve tags in case of failure.
* vfs/extfs/ftplist.in: Remove support for running commands, it * vfs/extfs/ftplist.in: Remove support for running commands, it
makes no sence. makes no sence.

View File

@ -6,9 +6,9 @@ shell_patterns=0
+ t t + t t
@ Do something on the tagged files @ Do something on the tagged files
set %u; CMD=%{Enter command} set %t; CMD=%{Enter command}
while [ -n "$1" ]; do while [ -n "$1" ]; do
$CMD "$1" || echo tag "$1" >>$MC_CONTROL_FILE $CMD "$1"
shift shift
done done
@ -55,9 +55,9 @@ a Append file to opposite
+ t t + t t
A Append files to opposite files A Append files to opposite files
set %u set %t
while [ -n "$1" ]; do while [ -n "$1" ]; do
cat $1 >>%D/$1 || echo tag $1 >>$MC_CONTROL_FILE cat $1 >>%D/$1
shift shift
done done
@ -123,7 +123,7 @@ h Strip headers from current newsarticle
+ t t + t t
H Strip headers from the marked newsarticles H Strip headers from the marked newsarticles
set %u set %t
while [ -n "$1" ]; do while [ -n "$1" ]; do
CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null
WFILE=/tmp/${1}.$$ WFILE=/tmp/${1}.$$
@ -133,13 +133,11 @@ H Strip headers from the marked newsarticles
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
rm $WFILE; echo $1 header removed. OK. rm $WFILE; echo $1 header removed. OK.
else else
echo tag $1 >>$MC_CONTROL_FILE
echo "Oops! Please check $1 against $WFILE" echo "Oops! Please check $1 against $WFILE"
fi fi
;; ;;
*) *)
echo $1 skipped: Not a news article. echo $1 skipped: Not a news article.
echo tag $1 >>$MC_CONTROL_FILE
;; ;;
esac esac
shift shift
@ -170,7 +168,7 @@ t Run latex on file and show it with xdvi
=+ f ^part | f ^Part | f uue & t r =+ f ^part | f ^Part | f uue & t r
+ t t + t t
U Uudecode marked news articles (needs work) U Uudecode marked news articles (needs work)
set %u set %t
( (
while [ -n "$1" ]; do # strip headers while [ -n "$1" ]; do # strip headers
FIRST=`awk '{print $1 ; exit}' $1` FIRST=`awk '{print $1 ; exit}' $1`
@ -179,10 +177,6 @@ U Uudecode marked news articles (needs work)
) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode ) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "Could not decode %t" echo "Could not decode %t"
for i in %t; do
echo tag $i >>$MC_CONTROL_FILE
shift
done
fi fi
echo "Please test the output file before deleting anything" echo "Please test the output file before deleting anything"
@ -256,7 +250,7 @@ z Extract compressed tar file to subdirectory
+ t t + t t
Z Extract compressed tar files to subdirectories Z Extract compressed tar files to subdirectories
for i in %u for i in %t
do do
set gzip -dc set gzip -dc
unset D unset D
@ -269,7 +263,7 @@ Z Extract compressed tar files to subdirectories
*.tar.F) D="`basename $i .tar.F`"; set freeze -dc;; *.tar.F) D="`basename $i .tar.F`"; set freeze -dc;;
*.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;; *.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
esac esac
mkdir $D; (cd $D && $1 $2 ../$i | tar xvf -)||echo tag $i >>$MC_CONTROL_FILE mkdir $D; (cd $D && $1 $2 ../$i | tar xvf -)
done done
+ f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t + f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
@ -296,7 +290,7 @@ c Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
+ t t + t t
C Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2 C Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
set %u set %t
while [ -n "$1" ] while [ -n "$1" ]
do do
unset D unset D
@ -315,9 +309,11 @@ C Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
bz2) D="`basename $1 .bz2`";; bz2) D="`basename $1 .bz2`";;
esac esac
if [ "$EXT" = "bz2" ]; then if [ "$EXT" = "bz2" ]; then
(bunzip2 -v $1 ; gzip -f9 -v $D)||echo tag $1 >>$MC_CONTROL_FILE bunzip2 -v $1
gzip -f9 -v $D
else else
(gunzip -v $1 ; bzip2 -v --repetitive-best $D)||echo tag $1 >>$MC_CONTROL_FILE gunzip -v $1
bzip2 -v --repetitive-best $D
fi fi
shift shift
done done