1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

Add batch_sign.sh

This commit is contained in:
Martin Oberhuber 2006-11-12 21:24:13 +00:00
parent ae1981f953
commit e881910df2
2 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,85 @@
#!/bin/sh
#*******************************************************************************
# Copyright (c) 2006 Wind River Systems, Inc.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Martin Oberhuber - initial API and implementation
#*******************************************************************************
#:#
#:# Script to sign all ZIP files in a directory
#:#
#:# Usage:
#:# batch_sign.sh {directory}
#:# Examples:
#:# batch_sign.sh publish/S-1.0M5-200611100500
#nothing we do should be hidden from the world
##newgrp dsdp-tm-rse # newgrp doesnt work from shellscripts -- use sg instead
umask 2
#Use Java5 on build.eclipse.org
#export PATH=/shared/common/ibm-java2-ppc64-50/bin:$PATH
export PATH=/shared/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH
curdir=`pwd`
#Get parameters
dirToSign=$1
usage=0
if [ "$dirToSign" = "" ]; then
usage=1
elif [ ! -d "$dirToSign" ]; then
usage=1
fi
if [ $usage = 1 ]; then
grep '^#:#' $0 | grep -v grep | sed -e 's,^#:#,,'
exit 0
fi
#sign the zipfiles
cd "$dirToSign"
RDIR=`pwd`
sg dsdp-tm-rse -c "mkdir -p signed"
nameToSign=`basename $RDIR`
ZIPS=`ls *.zip *.jar`
STAGING=/home/data/httpd/download-staging.priv/dsdp/tm
STDIR=${STAGING}/${nameToSign}
mkdir -p ${STDIR}
cp ${ZIPS} ${STDIR}
cd ${STDIR}
mkdir out
for x in $ZIPS ; do
sign $x nomail ${STDIR}/out
done
echo "Waiting for signature..."
sleep 300
TRIES=20
do
MISSING=""
sleep 60
for x in $ZIPS ; do
if [ -f ${STDIR}/out/$x ]; then
echo "Done: TRIES=${TRIES}, $x"
sg dsdp-tm-rse -c "cp -f ${STDIR}/out/$x ${RDIR}/signed/$x"
else
MISSING="${MISSING} $x"
fi
done
echo "Signed: TRIES=${TRIES}, Missing ${MISSING}"
ZIPS="${MISSING}"
TRIES=`expr $TRIES - 1`
while [ "$MISSING" != "" -a ${TRIES} -gt 0 ]
rm -rf ${STDIR}
cd "$curdir"
if [ "$MISSING" != "" ]; then
echo "batch_sign failed: ${MISSING}"
exit 1
fi
echo "batch_sign complete"
exit 0

View file

@ -43,6 +43,10 @@ if [ $ok != 1 ]; then
exit 0 exit 0
fi fi
#get mydir
cd `dirname $0`
mydir=`pwd`
#Remove old logs and builds #Remove old logs and builds
echo "Removing old logs and builds..." echo "Removing old logs and builds..."
cd $HOME/ws cd $HOME/ws
@ -81,6 +85,11 @@ if [ -f package.count -a "$FILES" != "" ]; then
#hide the release for now until it is tested #hide the release for now until it is tested
#mirrors will still pick it up #mirrors will still pick it up
mv package.count package.count.orig mv package.count package.count.orig
#DO_SIGN=1
fi
if [ "$DO_SIGN" = "1" ]; then
#sign the zipfiles
${mydir}/batch_sign.sh `pwd`
fi fi
#update the doc server #update the doc server