#!/bin/sh
#	repos [dir] file...
#
# Reposition files.  Each file is moved to dir, and replaced with a symlink
# at their old position.  This is useful mostly in moving things between disk
# partitions to make space.  /usr/etc is the default directory, since the
# most common use of this script is getting stuff out of /etc.
#
if [ -n "$DEBUG" ];then echo Call: $0 $*; fi
if [ $# -lt 1 ];then echo Usage: $0 [dir] file...; exit 1; fi
if [ -d $1 ];then
	D=$1
	shift
else D=/usr/etc
fi
for f
do	if [ -n "$DEBUG" ];then echo File: $f; fi
	Mv $f $D
	ln -s $D/`basename $f` $f
done
