summaryrefslogtreecommitdiff
path: root/usr.sbin/manctl/manctl.sh
diff options
context:
space:
mode:
authorGeoff Rehmet <csgr@FreeBSD.org>1994-04-17 22:13:08 +0000
committerGeoff Rehmet <csgr@FreeBSD.org>1994-04-17 22:13:08 +0000
commitf503299a86dd96c9a24571198c2e990df1defc5b (patch)
tree5fb1c1f6bfbc07264b387153292a95b6494d664c /usr.sbin/manctl/manctl.sh
parentfd785755a96995d1356d7a4200b0b8aa731368c5 (diff)
downloadsrc-test2-f503299a86dd96c9a24571198c2e990df1defc5b.tar.gz
src-test2-f503299a86dd96c9a24571198c2e990df1defc5b.zip
Notes
Diffstat (limited to 'usr.sbin/manctl/manctl.sh')
-rw-r--r--usr.sbin/manctl/manctl.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/manctl/manctl.sh b/usr.sbin/manctl/manctl.sh
index 80003456d668..bc12faba8fba 100644
--- a/usr.sbin/manctl/manctl.sh
+++ b/usr.sbin/manctl/manctl.sh
@@ -122,10 +122,13 @@ do_uncompress()
{
local i
local dir
+ local workdir
+ workdir=`pwd`
while [ $# != 0 ] ; do
if [ -d $1 ] ; then
dir=$1
+ cd $dir
for i in $dir/* ; do
case $i in
*cat?) ;; # ignore cat directories
@@ -139,6 +142,7 @@ do_uncompress()
fi } ;;
esac
done
+ cd $workdir
else
echo "directory $1 not found" 1>&2
fi
@@ -211,11 +215,14 @@ do_compress()
{
local i
local dir
+ local workdir
+ workdir=`pwd`
while [ $# != 0 ] ; do
if [ -d $1 ] ; then
dir=$1
- for i in $dir/* ; do
+ cd $dir
+ for i in * ; do
case $i in
*cat?) ;; # ignore cat directories
*) {
@@ -228,6 +235,7 @@ do_compress()
fi } ;;
esac
done
+ cd $workdir
else
echo "directory $1 not found" 1>&2
fi