1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
|
#!/bin/bash
dir=/var/www
if [ -z $1 ]
then
echo "Usage: $0 {number}"
exit 1
fi
if [ -d $dir/web$1 ]
then
echo "Directory $dir/web$1 already exists"
exit 1
fi
echo "Creating directory structure for web$1"
mkdir $dir/web$1 $dir/web$1/code $dir/web$1/dev
exit 0 |