Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mchristensen1
wf-testapps
update_source.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File update_source.sh of Package wf-testapps
#!/bin/sh # # Updates dekiwiki source and creates a tar file with the # correct version and svn revision number # # TODO: # - automatically update the version info in the spec file # - automatically put sources in place for RPM build # - use command line tools for suse build service to automatically # upload the sources and kick off a new build # BASE_NAME=wf-testapps MODULE_NAME=winforms MJVER="0.5" TMP_FILE=/tmp/${BASE_NAME}_co.txt REV="" # Remove old links if they exits. for I in $(find -type l | grep -e "${BASE_NAME}-[[:digit:]]*$"); do rm -v $I done # Update/checkout code and set revision. if [ -d ${BASE_NAME} ]; then cd ${BASE_NAME} svn update > ${TMP_FILE} 2>&1 REV=$(grep -E "^Updated|^Checked|^At.*revision[[:space:]]*[[:digit:]]*" ${TMP_FILE} | \ sed -n -e 's/^.*revision[[:space:]]*\([[:digit:]]*\)\./\1/gp') cd .. else echo "Unable to cd into ${BASE_NAME} directory. Checking out new version." svn co svn://anonsvn.mono-project.com/source/trunk/${MODULE_NAME} ${BASE_NAME} > ${TMP_FILE} 2>&1 REV=$(grep -E "^Updated|^Checked|^At.*revision[[:space:]]*[[:digit:]]*" ${TMP_FILE} | \ sed -n -e 's/^.*revision[[:space:]]*\([[:digit:]]*\)\./\1/gp') fi # Get Major version number echo "MJVER = ${MJVER}" if [ -z ${MJVER} ]; then echo "No major revision number. Exiting." exit 1 fi echo "REV = ${REV}" if [ -z ${REV} ]; then echo "No minor revision number. Exiting." exit 1 fi # Exit if the archive already exists. if [ -f ${BASE_NAME}-${MJVER}.${REV}.tar.bz2 ]; then echo "${BASE_NAME}-${MJVER}.${REV}.tar.bz2 already exists. Exiting" exit 0 fi # Otherwise, create the tar file. echo "Making tar archive ${BASE_NAME}-${MJVER}.${REV}.tar.bz2." ln -s ${BASE_NAME} ${BASE_NAME}-${MJVER}.${REV} tar --exclude=.svn -jhcf ${BASE_NAME}-${MJVER}.${REV}.tar.bz2 ${BASE_NAME}-${MJVER}.${REV} echo "Done" rm ${BASE_NAME}-${MJVER}.${REV} rm ${TMP_FILE} # Update version in spec file if [ -e ${BASE_NAME}.spec ]; then sed -i -e "s@[[:space:]]*%define[[:space:]][[:space:]]*ver.*@%define ver ${MJVER}.${REV}@" ${BASE_NAME}.spec fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor