Skip to content
Snippets Groups Projects
Commit d7fe97e1 authored by david_williams's avatar david_williams
Browse files

add level to download sites

parent 8f07dd14
No related branches found
No related tags found
No related merge requests found
Showing
with 84 additions and 84 deletions
#!/bin/sh #!/bin/sh
# script to delete warm-up builds, except the one promoted # script to delete warm-up builds, except the one promoted
# the promoted on is left just for safety # the promoted on is left just for safety
declaredStream=$1 declaredStream=$1
declaredDir=$2 declaredDir=$2
# make sure directories to delete start with same 3 chars as target # make sure directories to delete start with same 3 chars as target
pattern=${declaredDir:0:5} pattern=${declaredDir:0:5}
echo restrict to directory names that match $pattern echo restrict to directory names that match $pattern
echo act on directories older than $declaredDir echo act on directories older than $declaredDir
# example of full form from command line # example of full form from command line
# find ./drops -maxdepth 1 -type d -name I-I* -not -cnewer drops/I-I200603180020-200603180020 -exec rm -fr {} \; # find ./drops -maxdepth 1 -type d -name I-I* -not -cnewer drops/I-I200603180020-200603180020 -exec rm -fr {} \;
if [ "$3" != "-doit" ] ; then if [ "$3" != "-doit" ] ; then
echo " This is a dry run. Add -doit to actually remove" echo " This is a dry run. Add -doit to actually remove"
thisCommand=" echo " thisCommand=" echo "
else else
thisCommand=" rm -fr " thisCommand=" rm -fr "
fi fi
find ./drops -maxdepth 2 -type d -name "$pattern*" -not -newer "./drops/$declaredStream/$declaredDir" -exec $thisCommand {} \; find ./drops -maxdepth 2 -type d -name "$pattern*" -not -newer "./drops/$declaredStream/$declaredDir" -exec $thisCommand {} \;
echo $1 $2 echo $1 $2
declaredStream=$1 declaredStream=$1
declaredDir=$2 declaredDir=$2
FROMDIR=../committers/drops FROMDIR=../committers/drops
TODIR=../downloads/drops/${declaredStream} TODIR=../downloads/drops/${declaredStream}
FROMDIR=$FROMDIR/${declaredStream}/${declaredDir} FROMDIR=$FROMDIR/${declaredStream}/${declaredDir}
echo "declaring build ${declaredDir} on buildstream ${declaredStream}" echo "declaring build ${declaredDir} on buildstream ${declaredStream}"
echo " into ${TODIR}" echo " into ${TODIR}"
echo " using the build from ${FROMDIR}" echo " using the build from ${FROMDIR}"
cp -R ${FROMDIR} ${TODIR} cp -R ${FROMDIR} ${TODIR}
fromString="committers/drops/${declaredStream}/" fromString="committers/drops/${declaredStream}/"
toString="downloads/drops/${declaredStream}/" toString="downloads/drops/${declaredStream}/"
replaceCommand="s!${fromString}!${toString}!g" replaceCommand="s!${fromString}!${toString}!g"
perl -w -pi -e ${replaceCommand} ${TODIR}/${declaredDir}/*.php perl -w -pi -e ${replaceCommand} ${TODIR}/${declaredDir}/*.php
# update the update site # update the update site
#cp -ruv $HOME/downloads/webtools/committers/drops/$1/updateSite/features/ $HOME/downloads/webtools/milestones/ #cp -ruv $HOME/downloads/webtools/committers/drops/$1/updateSite/features/ $HOME/downloads/webtools/milestones/
#cp -ruv $HOME/downloads/webtools/committers/drops/$1/updateSite/plugins/ $HOME/downloads/webtools/milestones/ #cp -ruv $HOME/downloads/webtools/committers/drops/$1/updateSite/plugins/ $HOME/downloads/webtools/milestones/
declaredStream=$1 declaredStream=$1
declaredDir=$2 declaredDir=$2
FROMDIR=$HOME/downloads/webtools/committers/drops FROMDIR=$HOME/downloads/webtools/committers/drops
FROMDIR=$FROMDIR/${declaredStream}/${declaredDir}/updateSite FROMDIR=$FROMDIR/${declaredStream}/${declaredDir}/updateSite
TODIR=$HOME/downloads/webtools/declaredUpdates TODIR=$HOME/downloads/webtools/declaredUpdates
echo "declaring update ${declaredDir} on buildstream ${declaredStream}" echo "declaring update ${declaredDir} on buildstream ${declaredStream}"
echo " into ${TODIR}" echo " into ${TODIR}"
echo " using the build from ${FROMDIR}" echo " using the build from ${FROMDIR}"
# update the update site with changes only # update the update site with changes only
rsync --ignore-existing -rv $FROMDIR/features $TODIR rsync --ignore-existing -rv $FROMDIR/features $TODIR
rsync --ignore-existing -rv $FROMDIR/plugins $TODIR rsync --ignore-existing -rv $FROMDIR/plugins $TODIR
#!/bin/sh #!/bin/sh
fromString="\<font size=\"-1\" color=\"#FF0000\"\>pending\</font\>" fromString="\<font size=\"-1\" color=\"#FF0000\"\>pending\</font\>"
toString="\<img src = \"OK.gif\" width=19 height=23\>" toString="\<img src = \"OK.gif\" width=19 height=23\>"
replaceCommand="s!${fromString}!${toString}!g" replaceCommand="s!${fromString}!${toString}!g"
echo "replaceCommand: ${replaceCommand}" echo "replaceCommand: ${replaceCommand}"
perl -w -pi -e "${replaceCommand}" index.php perl -w -pi -e "${replaceCommand}" index.php
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment