Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
graphics
mvs-texturing
get_from_git.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get_from_git.sh of Package mvs-texturing
#!/bin/bash if (( $# != 4 )); then echo "Usage: $0 <CLONE_NAME> <CLONE_REPO> <LATEST_RELEASE> <BRANCH>" >&2 exit 1 fi CLONE_NAME="$1" CLONE_REPO="$2" LATEST_RELEASE="$3" BRANCH="$4" if [ -d $CLONE_NAME/.git ]; then cd $CLONE_NAME git pull cd .. else set -e git clone https://github.com/$CLONE_REPO/$CLONE_NAME.git $CLONE_NAME set +e fi TOPDIR=$(pwd) osc rm -f $CLONE_NAME-*.tar.xz || true cd $CLONE_NAME git config tar.tar.xz.command "xz -c" LINE=$(git show --format=format:"%h %ai"|head -n 1) set -- $LINE REV=$1 DATE=$2 VER=${DATE//-/} set -e echo "Creating git archive for $CLONE_NAME ...." git archive --format=tar.xz --prefix=$CLONE_NAME-${LATEST_RELEASE}+${VER}.${REV}/ -o $TOPDIR/$CLONE_NAME-${LATEST_RELEASE}+${VER}.${REV}.tar.xz $BRANCH cd $TOPDIR echo $VER echo $REV osc add $CLONE_NAME-${LATEST_RELEASE}+${VER}.${REV}.tar.xz sed -i "s/^Version:.*/Version: ${LATEST_RELEASE}+${VER}.${REV}/" $CLONE_NAME.spec osc vc -m "Update to version $REV ($DATE):"
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