]> Pileus Git - ~andy/ct/blob - gallery/mkgallery
Add timestamp checking
[~andy/ct] / gallery / mkgallery
1 #!/bin/bash
2
3 if [ -z "$1" ]; then
4         echo "usage: mkgallery <path>"
5         exit
6 fi
7
8 SRC=/home/andy/src/ct/gallery
9
10 base="$1"
11 files=("$base"/*)
12
13 mkdir -p "$base"/{large,small,thumb}
14 mv       "${files[@]}" large
15
16 chgrp apache "$base"/{small,thumb}
17 chmod 775    "$base"/{small,thumb}
18
19 ln -s $SRC/gallery  "$base"/index.bin
20 ln -s $SRC/htaccess "$base"/.htaccess