Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:sp5-rebuild
gdb.25639
import-patches.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File import-patches.sh of Package gdb.25639
#!/bin/sh # Invoke as: # $ ./import-patches.sh [ --dry-run ] <n> <dir>/00*.patch dryrun=false case "$1" in -dryrun|-dry-run|--dryrun|--dry-run) dryrun=true shift ;; esac n="$1" shift files="$*" rm -Rf tmp.patches mkdir tmp.patches tmp= for f in $files; do dir=$(dirname "$f") f=$(basename "$f") orig_f="$f" # Remove numeric prefix. f=$(echo "$f" \ | sed 's/^[0-9]*-//') # To lowercase. f=$(echo "$f" \ | tr '[:upper:]' '[:lower:]') # Fix patch.patch. f=$(echo "$f" \ | sed 's/\.patch\.patch/.patch/') # Copy. cp "$dir"/"$orig_f" tmp.patches/"$f" tmp="$tmp $f" done files="$tmp" i=$n for f in $files; do printf "Patch%-11s%s\n" "$i:" "$f" i=$((i + 1)) done i=$n for f in $files; do echo "%patch$i -p1" i=$((i + 1)) done if $dryrun; then exit fi for f in $files; do mv tmp.patches/"$f" . osc add "$f" done rmdir tmp.patches
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