Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mchristensen1
dekiwiki
update_dekiwiki.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File update_dekiwiki.sh of Package dekiwiki
#!/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=dekiwiki MJVER=1.8.3 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}-${MJVER} ]; then cd ${BASE_NAME}-${MJVER} 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}-${MJVER}' directory. Checking out new version." svn co http://dekiwiki.svn.sourceforge.net/svnroot/dekiwiki/public/dekiwiki/${MJVER}/ dekiwiki-${MJVER} > ${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 echo "REV = ${REV}" if [ -z ${REV} ]; then echo "No 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}-${MJVER} ${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}
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