Added a script to build the jscript repo on sourceforge servers

This commit is contained in:
Jorrit Wronski
2015-01-31 11:26:31 +01:00
parent 0064728b56
commit fc45f706ad
2 changed files with 31 additions and 2 deletions

View File

@@ -115,8 +115,8 @@ else
printMessage "Preparing the docs and moving them into the $BINFOLDER folder for staging"
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "frs.sf.net-$SFUSER:/home/frs/project/coolprop/CoolProp/$DOC4FILES" "$(basename $DOC4FILES)"
unzip -qo "$(basename $DOC4FILES)" -d "$DOC4FOLDER"
zip -rq "$DOCFILE" $SPHFOLDER/* -x */$(basename $DOC4FOLDER)/*
mv "$DOCFILE" "$DOCFOLDER"
zip -rq "$DOCFILE" $SPHFOLDER/* -x */$(basename $DOC4FOLDER)/*
mv "$DOCFILE" "$DOCFOLDER"
#
if [ "$CPVERSION" == "nightly" ]; then
printMessage "Detected nightly release, updating README.rst.txt"

View File

@@ -0,0 +1,29 @@
#!/bin/bash
# A little script to build the JavaScript repository on the
# web directory. Can be run to regenerate the repo in case
# it case it gets deleted accidentally.
#
FILDIR="/home/frs/project/coolprop/CoolProp"
WEBDIR="/home/project-web/coolprop/htdocs"
#
LATTMP="${FILDIR}/latest/dummy"
TARGETDIR="${WEBDIR}"/jscript
mkdir -p "${TARGETDIR}"
#
function parsePath {
local CURFILE="$1"
local CPVERSION=$(cut -d/ -f7 <<<"${CURFILE}")
local RES="${TARGETDIR}/coolprop-${CPVERSION}.js"
echo "${RES}"
}
#
JSFILES="$(find ${FILDIR} -iname '*coolprop.js')"
for CURFILE in $JSFILES; do
TARGETFILE="$(parsePath $CURFILE)"
ln -s "${CURFILE}" "${TARGETFILE}"
done
#
CURVER="${TARGETDIR}/$(ls ${TARGETDIR} | tail -n 2 | head -n 1)"
LATVER="$(parsePath $LATTMP)"
ln -s "${CURVER}" "${LATVER}"
exit 0