#!/bin/sh # mkspooldirs for VideoteXt # # $Id: mkspooldirs,v 1.2 1997/06/16 22:22:06 mb Exp mb $ # # Copyright (c) 1995-96 Martin Buck # Read COPYING for more information # This script creates the spool-directories for all the stations in a hotlist-file. if [ $# -lt 2 ] || [ $# -gt 4 ]; then echo "Usage: $0 [perm] [group]" >&2 exit 1 fi if [ ! -e "$1" ]; then echo "$0: File $1 doesn't exist" >&2 exit 1 fi if [ ! -d "$2" ]; then echo "$0: Directory $2 doesn't exist" >&2 exit 1 fi IFS=" " for station in `grep '^station ' "$1"`; do station="`echo "$station" | sed -e 's@^station @@g' -e 's@/@_@g'`" if [ "x$station" != xUnknown ]; then echo "Creating directory $2/$station" [ -d "$2/$station" ] || { mkdir "$2/$station" || exit 1; } [ "x$3" != x ] && { chmod "$3" "$2/$station" || exit 1; } [ "x$4" != x ] && { chgrp "$4" "$2/$station" || exit 1; } fi done exit 0