36 lines
681 B
Bash
Executable File
36 lines
681 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get script working directory
|
|
# (when called from a different directory)
|
|
WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
|
|
|
|
if [ ! -s "$WDIR/config.sh" ] ; then
|
|
echo "No configuration found"
|
|
exit 1;
|
|
fi
|
|
. "$WDIR/config.sh"
|
|
|
|
myyear=$(date "+%Y")
|
|
if [ "$1" != "" ]
|
|
then
|
|
myyear=$1
|
|
fi
|
|
|
|
subDir="$myyear/"
|
|
thumbRoot="${piwiThumbRoot}/${subDir}"
|
|
photoRoot="${piwiPhotoRoot}/${subDir}"
|
|
|
|
if [ ! -e ${thumbRoot} ] ; then
|
|
echo "Thumbnail root ${thumbRoot} not found"
|
|
exit 1;
|
|
fi
|
|
|
|
if [ ! -e ${photoRoot} ] ; then
|
|
echo "Photo root ${photoRoot} not found"
|
|
exit 1;
|
|
fi
|
|
|
|
$WDIR/piwigo_thumbgen.sh "${photoRoot}" "${thumbRoot}"
|
|
|
|
$WDIR/piwirefresh.sh
|