it would ignore the 'destination' argument
esac
done
src="$1"; shift
esac
done
src="$1"; shift
if [ -n "$*" ] ; then
msg "update_file: unexpected arguments: $*"
return 1
fi
if [ -n "$*" ] ; then
msg "update_file: unexpected arguments: $*"
return 1
fi
+ if [ -z "$src" ] ; then
+ msg "update_file: no source file"
+ return 1
+ fi
+ if [ -z "$dst" ] ; then
+ dst=`basename "$src"`
+ fi
if [ "${dst#/}" = "${dst}" ] ; then
# relative path
dst="$DESTDIR/$dst"
if [ "${dst#/}" = "${dst}" ] ; then
# relative path
dst="$DESTDIR/$dst"