Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:leeds:network
linuxqq
update.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File update.sh of Package linuxqq
#!/usr/bin/env bash # update version update() { # Update SPEC File sed -i "s/%define _version [0-9]\.[0-9]\.[0-9]\-[0-9][0-9][0-9][0-9][0-9]/%define _version ${PROGRAM_VERSION}/g" "${PROGRAM_NAME}".spec sed -i "s/Version: [0-9]\.[0-9]\.[0-9]/Version: ${VERSION}/g" "${PROGRAM_NAME}".spec # Update _service sed -i "s/[0-9]\.[0-9]\.[0-9]\-[0-9][0-9][0-9][0-9][0-9]\_x86\_64/${PROGRAM_VERSION}\_x86\_64/g" _service sed "s/QQNT\/[a-f0-9]*/QQNT\/${PROGRAM_STR}/g" _service # Update ChangeLog osc vc -m "Update to ${VERSION}" # Diff osc diff # Commit osc ci } if [[ -z "$1" ]]; then echo "Please enter a version number as an argument." echo "e.g. ./update.sh https://dldir1.qq.com/qqfile/qq/QQNT/06d558c3/linuxqq_3.2.3-19189_x86_64.AppImage" exit 1 fi export PROGRAM_NAME=linuxqq PROGRAM_VERSION=$(echo "$1" | sed -E 's/https\:\/\/dldir1\.qq\.com\/qqfile\/qq\/QQNT\/([a-zA-Z0-9]+)\/linuxqq_([0-9]+\.[0-9]+\.[0-9]+-[0-9]+)_x86_64.AppImage/\2/') PROGRAM_STR=$(echo "$1" | sed -E 's/https\:\/\/dldir1\.qq\.com\/qqfile\/qq\/QQNT\/([a-zA-Z0-9]+)\/linuxqq_([0-9]+\.[0-9]+\.[0-9]+-[0-9]+)_x86_64.AppImage/\1/') VERSION=${PROGRAM_VERSION%-*} echo "PROGRAM_NAME: ${PROGRAM_NAME}" echo "PROGRAM_VERSION: ${PROGRAM_VERSION}" echo "PROGRAM_STR: ${PROGRAM_STR}" echo "VERSION: ${VERSION}" if [[ "${PROGRAM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]{5}$ ]]; then echo "The version number ${PROGRAM_VERSION} matched." update else echo "Error: The version number ${PROGRAM_VERSION} does not match." exit 1 fi exit 0
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