#!/bin/bash if [ -z "$1" ]; then echo "Please specify version" exit 1 fi VERSION=$1 SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" PRODUCT="synfig-me" SOURCE=${SCRIPTPATH}/template/ru DEST=${SCRIPTPATH}/../html/ru CRAWL_DIR=${SCRIPTPATH}/../${PRODUCT}/${VERSION} cd ${CRAWL_DIR} ARCH="win32-zip" FILENAME=`ls -1 *win32*.zip | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="win64-zip" FILENAME=`ls -1 *win64*.zip | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="win32" FILENAME=`ls -1 *win32*.exe | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="win64" FILENAME=`ls -1 *win64*.exe | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="linux32" FILENAME=`ls -1 *linux32*.appimage | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="linux64" FILENAME=`ls -1 *linux64*.appimage | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html ARCH="macos" FILENAME=`ls -1 *.dmg | head -n 1` sed -e "s/#VERSION#/${VERSION}/g" ${SOURCE}/${PRODUCT}-${ARCH}.html | sed -e "s/#FILE#/${FILENAME}/g" > ${DEST}/${PRODUCT}-${ARCH}.html