#!/bin/rc # Do not edit this file. Edit /sys/src/cmd/mail2fs/... instead # Be sure we remove only files under omero. fn saferm { if (! ~ `{echo $1 | wc -l} 1 || echo $1 | grep '([^a-zA-Z0-9_./:])|(\.\.)' >/dev/null || ! echo $1 | grep '^/devs/[a-z]*ui/' >/dev/null) echo no rm for $1 >/dev/null if not { rm -rf $1/* rm -f $1 } } if ( ~ $#* 0) { dir=`{basename -d $file} cd / test -d $dir || exit '' mv $dir `{echo $dir | sed 's|(.*/)([0-9]+)$|\1a.\2|'} if (! ~ $#panel 0 && ~ $panel /devs/*) rm -rf $panel if not saferm `{ofiles | grep $file'$' | sed 's|/tag:tag.*||'} } if not { if (~ $1 -f){ shift for (m in $*) { mv $m `{echo $m | sed 's|(.*/)([0-9]+)$|\1a.\2|'} } } if not echo Arch -f $* } exit ''