#!/bin/bash #script to create the media directories #used for building ISO (go.sh) and LiveCD (pre_install.sh) #call it like so #create_media_dirs.sh /top_level_path topdir=$1 if [ x$topdir = "x" ] then echo "Top level dir is empty" exit 1 fi if [ ! -d "$topdir" ] then echo "$topdir is not a dir or does not exist" exit 2 fi while read dirname do mkdir -p "${topdir}/${dirname}" touch "${topdir}/${dirname}/.media" chown mythtv:users "${topdir}/${dirname}" chmod 775 "${topdir}/${dirname}" chmod 775 "${topdir}/${dirname}/.media" done <